mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
67
web/node_modules/postcss-normalize/CHANGELOG.md
generated
vendored
Normal file
67
web/node_modules/postcss-normalize/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Changes to PostCSS Normalize
|
||||
|
||||
### 8.0.1 (June 10, 2019)
|
||||
|
||||
- Fixed: Issue with Windows failing to resolve normalize
|
||||
- Updated: `browserslist` to 4.6.2 (patch)
|
||||
- Updated: `postcss` to 7.0.17 (patch)
|
||||
|
||||
### 8.0.0 (June 3, 2019)
|
||||
|
||||
- Added: `sanitize.css` 10.0.0 (major)
|
||||
- Updated: `@csstools/normalize.css` to 10.1.0 (major)
|
||||
- Updated: `browserslist` to 4.5.6 (minor)
|
||||
- Updated: `postcss` to 7.0.16 (patch)
|
||||
- Updated: Node 8+ compatibility (major)
|
||||
|
||||
### 7.0.1 (August 24, 2018)
|
||||
|
||||
- Use postcss-browser-comments v2.0.0 (major, but a patch for this project)
|
||||
|
||||
PostCSS Browser Comments was using an older version of PostCSS, requiring 2
|
||||
versions of PostCSS to use PostCSS Normalize. This update resolves that.
|
||||
|
||||
### 7.0.0 (August 24, 2018)
|
||||
|
||||
- Use normalize.css v9.0.1 (major)
|
||||
|
||||
### 6.0.0 (June 16, 2018)
|
||||
|
||||
- Use normalize.css v8 (major)
|
||||
- Include normalize.css comments
|
||||
- Include normalize.css sourcemap
|
||||
|
||||
### 5.0.0 (June 7, 2018)
|
||||
|
||||
- Update `browserslist` to 3.2.8 (major)
|
||||
- Update: `postcss` to 6.0.22 (patch)
|
||||
- Update: Node support from v4 to 6 (major)
|
||||
|
||||
### 4.0.0 (June 21, 2017)
|
||||
|
||||
- Require insertion point. Make old behavior an option.
|
||||
- Allow multiple insertion points.
|
||||
|
||||
### 3.0.0 (May 26, 2017)
|
||||
|
||||
- Use jonathantneal/normalize.css v7
|
||||
- Change the insertion point to `@import-normalize` to avoid confusion or
|
||||
collision with standard import behavior
|
||||
|
||||
### 2.1.0 (May 26, 2017)
|
||||
|
||||
- Support an insertion point via `@import postcss-normalize`
|
||||
- Update tree creation to avoid AST issues with source
|
||||
|
||||
### 2.0.1 (May 21, 2017)
|
||||
|
||||
- Update tree creation to avoid AST issues with other PostCSS plugins
|
||||
|
||||
### 2.0.0 (May 17, 2017)
|
||||
|
||||
- Support PostCSS 6
|
||||
- Support Node 4
|
||||
|
||||
### 1.0.0 (May 2, 2017)
|
||||
|
||||
- Initial version
|
108
web/node_modules/postcss-normalize/LICENSE.md
generated
vendored
Normal file
108
web/node_modules/postcss-normalize/LICENSE.md
generated
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
# CC0 1.0 Universal
|
||||
|
||||
## Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator and
|
||||
subsequent owner(s) (each and all, an “owner”) of an original work of
|
||||
authorship and/or a database (each, a “Work”).
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for the
|
||||
purpose of contributing to a commons of creative, cultural and scientific works
|
||||
(“Commons”) that the public can reliably and without fear of later claims of
|
||||
infringement build upon, modify, incorporate in other works, reuse and
|
||||
redistribute as freely as possible in any form whatsoever and for any purposes,
|
||||
including without limitation commercial purposes. These owners may contribute
|
||||
to the Commons to promote the ideal of a free culture and the further
|
||||
production of creative, cultural and scientific works, or to gain reputation or
|
||||
greater distribution for their Work in part through the use and efforts of
|
||||
others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any expectation of
|
||||
additional consideration or compensation, the person associating CC0 with a
|
||||
Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
|
||||
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
|
||||
publicly distribute the Work under its terms, with knowledge of his or her
|
||||
Copyright and Related Rights in the Work and the meaning and intended legal
|
||||
effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights (“Copyright and
|
||||
Related Rights”). Copyright and Related Rights include, but are not limited
|
||||
to, the following:
|
||||
1. the right to reproduce, adapt, distribute, perform, display, communicate,
|
||||
and translate a Work;
|
||||
2. moral rights retained by the original author(s) and/or performer(s);
|
||||
3. publicity and privacy rights pertaining to a person’s image or likeness
|
||||
depicted in a Work;
|
||||
4. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(i), below;
|
||||
5. rights protecting the extraction, dissemination, use and reuse of data in
|
||||
a Work;
|
||||
6. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation thereof,
|
||||
including any amended or successor version of such directive); and
|
||||
7. other similar, equivalent or corresponding rights throughout the world
|
||||
based on applicable law or treaty, and any national implementations
|
||||
thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention of,
|
||||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
|
||||
unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
|
||||
and Related Rights and associated claims and causes of action, whether now
|
||||
known or unknown (including existing as well as future claims and causes of
|
||||
action), in the Work (i) in all territories worldwide, (ii) for the maximum
|
||||
duration provided by applicable law or treaty (including future time
|
||||
extensions), (iii) in any current or future medium and for any number of
|
||||
copies, and (iv) for any purpose whatsoever, including without limitation
|
||||
commercial, advertising or promotional purposes (the “Waiver”). Affirmer
|
||||
makes the Waiver for the benefit of each member of the public at large and
|
||||
to the detriment of Affirmer’s heirs and successors, fully intending that
|
||||
such Waiver shall not be subject to revocation, rescission, cancellation,
|
||||
termination, or any other legal or equitable action to disrupt the quiet
|
||||
enjoyment of the Work by the public as contemplated by Affirmer’s express
|
||||
Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason be
|
||||
judged legally invalid or ineffective under applicable law, then the Waiver
|
||||
shall be preserved to the maximum extent permitted taking into account
|
||||
Affirmer’s express Statement of Purpose. In addition, to the extent the
|
||||
Waiver is so judged Affirmer hereby grants to each affected person a
|
||||
royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer’s Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future time
|
||||
extensions), (iii) in any current or future medium and for any number of
|
||||
copies, and (iv) for any purpose whatsoever, including without limitation
|
||||
commercial, advertising or promotional purposes (the “License”). The License
|
||||
shall be deemed effective as of the date CC0 was applied by Affirmer to the
|
||||
Work. Should any part of the License for any reason be judged legally
|
||||
invalid or ineffective under applicable law, such partial invalidity or
|
||||
ineffectiveness shall not invalidate the remainder of the License, and in
|
||||
such case Affirmer hereby affirms that he or she will not (i) exercise any
|
||||
of his or her remaining Copyright and Related Rights in the Work or (ii)
|
||||
assert any associated claims and causes of action with respect to the Work,
|
||||
in either case contrary to Affirmer’s express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
1. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
2. Affirmer offers the Work as-is and makes no representations or warranties
|
||||
of any kind concerning the Work, express, implied, statutory or
|
||||
otherwise, including without limitation warranties of title,
|
||||
merchantability, fitness for a particular purpose, non infringement, or
|
||||
the absence of latent or other defects, accuracy, or the present or
|
||||
absence of errors, whether or not discoverable, all to the greatest
|
||||
extent permissible under applicable law.
|
||||
3. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person’s Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the Work.
|
||||
4. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to this
|
||||
CC0 or use of the Work.
|
||||
|
||||
For more information, please see
|
||||
http://creativecommons.org/publicdomain/zero/1.0/.
|
207
web/node_modules/postcss-normalize/README.md
generated
vendored
Normal file
207
web/node_modules/postcss-normalize/README.md
generated
vendored
Normal file
|
@ -0,0 +1,207 @@
|
|||
# PostCSS Normalize [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
|
||||
|
||||
[![NPM Version][npm-img]][npm-url]
|
||||
[![Build Status][cli-img]][cli-url]
|
||||
[![Support Chat][git-img]][git-url]
|
||||
|
||||
[PostCSS Normalize] lets you use the parts of [normalize.css] or [sanitize.css]
|
||||
that you need from your [browserslist].
|
||||
|
||||
```css
|
||||
@import "normalize.css";
|
||||
```
|
||||
|
||||
```css
|
||||
@import "sanitize.css";
|
||||
```
|
||||
|
||||
**PostCSS Normalize** uses a non-opinionated version of [normalize.css], but
|
||||
an opinionated version may also be used.
|
||||
|
||||
```css
|
||||
@import "normalize.css/opinionated.css";
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
Here is a sample of what **normalize.css** looks like when the **browserslist**
|
||||
is `ie >= 9`:
|
||||
|
||||
```css
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
```
|
||||
|
||||
And here is the same sample when the **browserslist** is `ie >= 10`:
|
||||
|
||||
```css
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Add [PostCSS Normalize] to your project:
|
||||
|
||||
```bash
|
||||
npm install postcss-normalize --save-dev
|
||||
```
|
||||
|
||||
Add a [browserslist] entry in `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"browserslist": "last 2 versions"
|
||||
}
|
||||
```
|
||||
|
||||
Use **PostCSS Normalize** to process your CSS:
|
||||
|
||||
```js
|
||||
const postcssNormalize = require('postcss-normalize')
|
||||
|
||||
postcssNormalize.process(YOUR_CSS /*, processOptions, pluginOptions */)
|
||||
```
|
||||
|
||||
Or use it as a [PostCSS] plugin:
|
||||
|
||||
```js
|
||||
const postcss = require('postcss')
|
||||
const postcssNormalize = require('postcss-normalize')
|
||||
|
||||
postcss([
|
||||
postcssNormalize(/* pluginOptions */)
|
||||
]).process(YOUR_CSS /*, processOptions */)
|
||||
```
|
||||
|
||||
**PostCSS Normalize** runs in all Node environments, with special instructions
|
||||
for:
|
||||
|
||||
| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
|
||||
## PostCSS Import Usage
|
||||
|
||||
**PostCSS Normalize** includes a `postcssImport` function to configure
|
||||
[PostCSS Import] and allow you to continue using the `@import` syntax.
|
||||
|
||||
```js
|
||||
const postcss = require('postcss')
|
||||
const postcssImport = require('postcss-import')
|
||||
const postcssNormalize = require('postcss-normalize')
|
||||
|
||||
postcss([
|
||||
postcssImport(
|
||||
postcssNormalize(
|
||||
/* pluginOptions (for PostCSS Normalize) */
|
||||
).postcssImport(
|
||||
/* pluginOptions (for PostCSS Import) */
|
||||
)
|
||||
)
|
||||
]) // now you can use @import "normalize.css", etc. again
|
||||
```
|
||||
|
||||
Alternatively, use `@import-normalize` or `@import-sanitize` to avoid conflicts
|
||||
with `@import` transforms.
|
||||
|
||||
```pcss
|
||||
@import-normalize;
|
||||
```
|
||||
|
||||
```pcss
|
||||
@import-normalize "opinionated.css";
|
||||
```
|
||||
|
||||
```pcss
|
||||
@import-sanitize;
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### allowDuplicates
|
||||
|
||||
The `allowDuplicates` option determines whether multiple, duplicate insertions
|
||||
of CSS libraries are allowed. By default, duplicate libraries are omitted.
|
||||
|
||||
```js
|
||||
postcssNormalize({ allowDuplicates: true })
|
||||
```
|
||||
|
||||
### forceImport
|
||||
|
||||
The `forceImport` option defines CSS libraries that will be inserted at the
|
||||
beginning of the CSS file. Unless overriden by `allowDuplicates`, duplicate
|
||||
CSS libraries would still be omitted.
|
||||
|
||||
```js
|
||||
postcssNormalize({ forceImport: true })
|
||||
```
|
||||
|
||||
Specific CSS libraries may be defined.
|
||||
|
||||
```js
|
||||
postcssNormalize({
|
||||
forceImport: 'sanitize.css'
|
||||
})
|
||||
```
|
||||
|
||||
### browsers
|
||||
|
||||
The `browsers` option defines an override of the project’s **browserslist** for
|
||||
**PostCSS Normalize**. This option should be avoided in leui of a browserslist
|
||||
file.
|
||||
|
||||
```js
|
||||
postcssNormalize({ browsers: 'last 2 versions' })
|
||||
```
|
||||
|
||||
## CSS Libraries
|
||||
|
||||
**PostCSS Normalize** can include [normalize.css] or [sanitize.css] and
|
||||
configure either with the following combinations:
|
||||
|
||||
```css
|
||||
@import "normalize"; /* also, @import "normalize.css" */
|
||||
@import "normalize/opinionated"; /* also, @import "normalize.css/opinionated.css", @import "normalize.css/*" */
|
||||
@import "sanitize"; /* also, @import "sanitize.css" */
|
||||
@import "sanitize/forms"; /* also, @import "sanitize.css/forms.css" */
|
||||
@import "sanitize/typography"; /* also, @import "sanitize.css/typography.css" */
|
||||
@import "sanitize/page"; /* also, @import "sanitize.css/page.css" */
|
||||
@import "sanitize/*"; /* also, @import "sanitize.css/*" (sanitize + all additions) */
|
||||
```
|
||||
|
||||
[cli-img]: https://img.shields.io/travis/csstools/postcss-normalize/master.svg
|
||||
[cli-url]: https://travis-ci.org/csstools/postcss-normalize
|
||||
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
|
||||
[git-url]: https://gitter.im/postcss/postcss
|
||||
[npm-img]: https://img.shields.io/npm/v/postcss-normalize.svg
|
||||
[npm-url]: https://www.npmjs.com/package/postcss-normalize
|
||||
|
||||
[browserslist]: http://browserl.ist/
|
||||
[CSS Libraries]: #css-libraries
|
||||
[normalize.css]: https://github.com/csstools/normalize.css
|
||||
[Options]: #options
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
[PostCSS Import]: https://github.com/postcss/postcss-import
|
||||
[PostCSS Import Usage]: #postcss-import-usage
|
||||
[PostCSS Normalize]: https://github.com/csstools/postcss-normalize
|
||||
[sanitize.css]: https://github.com/csstools/sanitize.css
|
170
web/node_modules/postcss-normalize/index.cjs.js
generated
vendored
Normal file
170
web/node_modules/postcss-normalize/index.cjs.js
generated
vendored
Normal file
|
@ -0,0 +1,170 @@
|
|||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var postcss = _interopDefault(require('postcss'));
|
||||
var postcssBrowserComments = _interopDefault(require('postcss-browser-comments'));
|
||||
var Module = _interopDefault(require('module'));
|
||||
var path = _interopDefault(require('path'));
|
||||
|
||||
var fs = _interopDefault(require('fs'));
|
||||
|
||||
const assign = (...objects) => Object.assign(...objects);
|
||||
const create = (...objects) => assign(Object.create(null), ...objects);
|
||||
|
||||
const currentFilename = __filename;
|
||||
const currentDirname = path.dirname(currentFilename); // get resolved filenames for css libraries
|
||||
|
||||
const normalizeCSS = resolve('@csstools/normalize.css');
|
||||
const normalizeOpinionatedCSS = resolve('@csstools/normalize.css/opinionated.css');
|
||||
const sanitizeCSS = resolve('sanitize.css');
|
||||
const sanitizeFormsCSS = resolve('sanitize.css/forms.css');
|
||||
const sanitizePageCSS = resolve('sanitize.css/page.css');
|
||||
const sanitizeTypographyCSS = resolve('sanitize.css/typography.css'); // export a hashmap of css library filenames
|
||||
|
||||
const parsableFilenames = create({
|
||||
[normalizeCSS]: true,
|
||||
[normalizeOpinionatedCSS]: true,
|
||||
[sanitizeCSS]: true,
|
||||
[sanitizeFormsCSS]: true,
|
||||
[sanitizePageCSS]: true,
|
||||
[sanitizeTypographyCSS]: true
|
||||
}); // export a hashmap of css library filenames by id
|
||||
|
||||
const resolvedFilenamesById = create({
|
||||
'normalize': [normalizeCSS],
|
||||
'normalize/opinionated': [normalizeOpinionatedCSS],
|
||||
'normalize/*': [normalizeOpinionatedCSS],
|
||||
'sanitize': [sanitizeCSS],
|
||||
'sanitize/forms': [sanitizeCSS, sanitizeFormsCSS],
|
||||
'sanitize/page': [sanitizeCSS, sanitizePageCSS],
|
||||
'sanitize/typography': [sanitizeCSS, sanitizeTypographyCSS],
|
||||
'sanitize/*': [sanitizeCSS, sanitizeFormsCSS, sanitizePageCSS, sanitizeTypographyCSS]
|
||||
}); // get the resolved filename of a package/module
|
||||
|
||||
function resolve(id) {
|
||||
return resolve[id] = resolve[id] || Module._resolveFilename(id, {
|
||||
id: currentFilename,
|
||||
filename: currentFilename,
|
||||
paths: Module._nodeModulePaths(currentDirname)
|
||||
});
|
||||
}
|
||||
|
||||
const cache = create();
|
||||
async function readFile(filename) {
|
||||
filename = path.resolve(filename);
|
||||
cache[filename] = cache[filename] || create();
|
||||
return new Promise((resolve, reject) => fs.stat(filename, (statsError, {
|
||||
mtime
|
||||
}) => statsError ? reject(statsError) : mtime === cache[filename].mtime ? resolve(cache[filename].data) : fs.readFile(filename, 'utf8', (readFileError, data) => readFileError ? reject(readFileError) : resolve((cache[filename] = {
|
||||
data,
|
||||
mtime
|
||||
}).data))));
|
||||
}
|
||||
|
||||
const cache$1 = create(null);
|
||||
var parse = ((filename, transformer) => readFile(filename).then( // cache the parsed css root
|
||||
css => cache$1[css] = cache$1[css] || postcss.parse(css, {
|
||||
from: filename
|
||||
})).then( // clone the cached root
|
||||
root => root.clone()).then( // transform the cloned root
|
||||
clone => Promise.resolve(transformer(clone)).then( // resolve the cloned root
|
||||
() => clone)));
|
||||
|
||||
var postcssImportNormalize = (commentsTransformer => opts => {
|
||||
opts = create(opts); // return an postcss-import configuration
|
||||
|
||||
return create({
|
||||
load(filename, importOptions) {
|
||||
return filename in parsableFilenames // parse the file (the file and css are conservatively cached)
|
||||
? parse(filename, commentsTransformer).then(root => root.toResult({
|
||||
to: filename,
|
||||
map: true
|
||||
}).css) : typeof opts.load === 'function' // otherwise, use the override loader
|
||||
? opts.load.call(null, filename, importOptions) // otherwise, return the (conservatively cached) contents of the file
|
||||
: readFile(filename);
|
||||
},
|
||||
|
||||
resolve(id, basedir, importOptions) {
|
||||
// get the css id by removing css extensions
|
||||
const cssId = id.replace(cssExtRegExp, '');
|
||||
return cssId in resolvedFilenamesById // return the known resolved path for the css id
|
||||
? resolvedFilenamesById[cssId] : typeof opts.resolve === 'function' // otherwise, use the override resolver
|
||||
? opts.resolve.call(null, id, basedir, importOptions) // otherwise, return the id to be resolved by postcss-import
|
||||
: id;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
const cssExtRegExp = /\.css\b/g;
|
||||
|
||||
const postcssPlugin = (commentsTransformer, opts) => root => {
|
||||
const promises = [];
|
||||
const insertedFilenames = {}; // use @import insertion point
|
||||
|
||||
root.walkAtRules(importRegExp, atrule => {
|
||||
// get name as a fallback value for the library (e.g. @import-normalize is like @import "normalize.css")
|
||||
const name = atrule.name.match(importRegExp)[1]; // get url from "library", 'library', url("library"), url('library'), or the fallback value
|
||||
|
||||
const url = (atrule.params.match(paramsRegExp) || []).slice(1).find(part => part) || name;
|
||||
|
||||
if (url) {
|
||||
// get the css id by removing css extensions
|
||||
const cssId = url.replace(cssExtRegExp$1, '');
|
||||
|
||||
if (cssId in resolvedFilenamesById) {
|
||||
// promise the library import is replaced with its contents
|
||||
promises.push(Promise.all(resolvedFilenamesById[cssId].filter( // ignore filenames that have already been inserted
|
||||
filename => insertedFilenames[filename] = opts.allowDuplicates || !(filename in insertedFilenames)).map( // parse the file (the file and css are conservatively cached)
|
||||
filename => parse(filename, commentsTransformer))).then(roots => {
|
||||
if (roots.length) {
|
||||
// combine all the library nodes returned by the parsed files
|
||||
const nodes = roots.reduce((all, root) => all.concat(root.nodes), []); // replace the import with all the library nodes
|
||||
|
||||
atrule.replaceWith(...nodes);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
return Promise.all([].concat( // promise the library imports are replaced with their contents
|
||||
promises, // promise certain libraries are prepended
|
||||
Promise.all([].concat(opts.forceImport || []).reduce( // filter the id to be a known id or boolean true
|
||||
(all, id) => {
|
||||
if (id === true) {
|
||||
all.push(...resolvedFilenamesById.normalize);
|
||||
} else if (typeof id === 'string') {
|
||||
const cssId = id.replace(cssExtRegExp$1, '');
|
||||
|
||||
if (cssId in resolvedFilenamesById) {
|
||||
all.push(...resolvedFilenamesById[cssId]);
|
||||
}
|
||||
}
|
||||
|
||||
return all;
|
||||
}, []).filter( // ignore filenames that have already been inserted
|
||||
filename => insertedFilenames[filename] = opts.allowDuplicates || !(filename in insertedFilenames)).map( // parse the file (the file and css are conservatively cached)
|
||||
filename => parse(filename, commentsTransformer))).then(roots => {
|
||||
if (roots.length) {
|
||||
// combine all the library nodes returned by the parsed files
|
||||
const nodes = roots.reduce((all, root) => all.concat(root.nodes), []); // prepend the stylesheet with all the library nodes
|
||||
|
||||
root.prepend(...nodes);
|
||||
}
|
||||
})));
|
||||
};
|
||||
|
||||
const cssExtRegExp$1 = /\.css\b/g;
|
||||
const importRegExp = /^import(?:-(normalize|sanitize))?$/;
|
||||
const paramsRegExp = /^\s*(?:url\((?:"(.+)"|'(.+)')\)|"(.+)"|'(.+)')[\W\w]*$/;
|
||||
|
||||
var index = postcss.plugin('postcss-normalize', opts => {
|
||||
opts = create(opts);
|
||||
const commentsTransformer = postcssBrowserComments(opts);
|
||||
const normalizeTransformer = postcssPlugin(commentsTransformer, opts);
|
||||
const postcssImportConfig = postcssImportNormalize(commentsTransformer);
|
||||
return assign(normalizeTransformer, {
|
||||
postcssImport: postcssImportConfig
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = index;
|
||||
//# sourceMappingURL=index.cjs.js.map
|
1
web/node_modules/postcss-normalize/index.cjs.js.map
generated
vendored
Normal file
1
web/node_modules/postcss-normalize/index.cjs.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
169
web/node_modules/postcss-normalize/index.esm.mjs
generated
vendored
Normal file
169
web/node_modules/postcss-normalize/index.esm.mjs
generated
vendored
Normal file
|
@ -0,0 +1,169 @@
|
|||
import postcss from 'postcss';
|
||||
import postcssBrowserComments from 'postcss-browser-comments';
|
||||
import Module from 'module';
|
||||
import path from 'path';
|
||||
import { URL } from 'url';
|
||||
import fs from 'fs';
|
||||
|
||||
const assign = (...objects) => Object.assign(...objects);
|
||||
const create = (...objects) => assign(Object.create(null), ...objects);
|
||||
|
||||
const currentURL = import.meta.url;
|
||||
const currentFilename = new URL(currentURL).pathname;
|
||||
const currentDirname = path.dirname(currentFilename); // get resolved filenames for css libraries
|
||||
|
||||
const normalizeCSS = resolve('@csstools/normalize.css');
|
||||
const normalizeOpinionatedCSS = resolve('@csstools/normalize.css/opinionated.css');
|
||||
const sanitizeCSS = resolve('sanitize.css');
|
||||
const sanitizeFormsCSS = resolve('sanitize.css/forms.css');
|
||||
const sanitizePageCSS = resolve('sanitize.css/page.css');
|
||||
const sanitizeTypographyCSS = resolve('sanitize.css/typography.css'); // export a hashmap of css library filenames
|
||||
|
||||
const parsableFilenames = create({
|
||||
[normalizeCSS]: true,
|
||||
[normalizeOpinionatedCSS]: true,
|
||||
[sanitizeCSS]: true,
|
||||
[sanitizeFormsCSS]: true,
|
||||
[sanitizePageCSS]: true,
|
||||
[sanitizeTypographyCSS]: true
|
||||
}); // export a hashmap of css library filenames by id
|
||||
|
||||
const resolvedFilenamesById = create({
|
||||
'normalize': [normalizeCSS],
|
||||
'normalize/opinionated': [normalizeOpinionatedCSS],
|
||||
'normalize/*': [normalizeOpinionatedCSS],
|
||||
'sanitize': [sanitizeCSS],
|
||||
'sanitize/forms': [sanitizeCSS, sanitizeFormsCSS],
|
||||
'sanitize/page': [sanitizeCSS, sanitizePageCSS],
|
||||
'sanitize/typography': [sanitizeCSS, sanitizeTypographyCSS],
|
||||
'sanitize/*': [sanitizeCSS, sanitizeFormsCSS, sanitizePageCSS, sanitizeTypographyCSS]
|
||||
}); // get the resolved filename of a package/module
|
||||
|
||||
function resolve(id) {
|
||||
return resolve[id] = resolve[id] || Module._resolveFilename(id, {
|
||||
id: currentFilename,
|
||||
filename: currentFilename,
|
||||
paths: Module._nodeModulePaths(currentDirname)
|
||||
});
|
||||
}
|
||||
|
||||
const cache = create();
|
||||
async function readFile(filename) {
|
||||
filename = path.resolve(filename);
|
||||
cache[filename] = cache[filename] || create();
|
||||
return new Promise((resolve, reject) => fs.stat(filename, (statsError, {
|
||||
mtime
|
||||
}) => statsError ? reject(statsError) : mtime === cache[filename].mtime ? resolve(cache[filename].data) : fs.readFile(filename, 'utf8', (readFileError, data) => readFileError ? reject(readFileError) : resolve((cache[filename] = {
|
||||
data,
|
||||
mtime
|
||||
}).data))));
|
||||
}
|
||||
|
||||
const cache$1 = create(null);
|
||||
var parse = ((filename, transformer) => readFile(filename).then( // cache the parsed css root
|
||||
css => cache$1[css] = cache$1[css] || postcss.parse(css, {
|
||||
from: filename
|
||||
})).then( // clone the cached root
|
||||
root => root.clone()).then( // transform the cloned root
|
||||
clone => Promise.resolve(transformer(clone)).then( // resolve the cloned root
|
||||
() => clone)));
|
||||
|
||||
var postcssImportNormalize = (commentsTransformer => opts => {
|
||||
opts = create(opts); // return an postcss-import configuration
|
||||
|
||||
return create({
|
||||
load(filename, importOptions) {
|
||||
return filename in parsableFilenames // parse the file (the file and css are conservatively cached)
|
||||
? parse(filename, commentsTransformer).then(root => root.toResult({
|
||||
to: filename,
|
||||
map: true
|
||||
}).css) : typeof opts.load === 'function' // otherwise, use the override loader
|
||||
? opts.load.call(null, filename, importOptions) // otherwise, return the (conservatively cached) contents of the file
|
||||
: readFile(filename);
|
||||
},
|
||||
|
||||
resolve(id, basedir, importOptions) {
|
||||
// get the css id by removing css extensions
|
||||
const cssId = id.replace(cssExtRegExp, '');
|
||||
return cssId in resolvedFilenamesById // return the known resolved path for the css id
|
||||
? resolvedFilenamesById[cssId] : typeof opts.resolve === 'function' // otherwise, use the override resolver
|
||||
? opts.resolve.call(null, id, basedir, importOptions) // otherwise, return the id to be resolved by postcss-import
|
||||
: id;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
const cssExtRegExp = /\.css\b/g;
|
||||
|
||||
const postcssPlugin = (commentsTransformer, opts) => root => {
|
||||
const promises = [];
|
||||
const insertedFilenames = {}; // use @import insertion point
|
||||
|
||||
root.walkAtRules(importRegExp, atrule => {
|
||||
// get name as a fallback value for the library (e.g. @import-normalize is like @import "normalize.css")
|
||||
const name = atrule.name.match(importRegExp)[1]; // get url from "library", 'library', url("library"), url('library'), or the fallback value
|
||||
|
||||
const url = (atrule.params.match(paramsRegExp) || []).slice(1).find(part => part) || name;
|
||||
|
||||
if (url) {
|
||||
// get the css id by removing css extensions
|
||||
const cssId = url.replace(cssExtRegExp$1, '');
|
||||
|
||||
if (cssId in resolvedFilenamesById) {
|
||||
// promise the library import is replaced with its contents
|
||||
promises.push(Promise.all(resolvedFilenamesById[cssId].filter( // ignore filenames that have already been inserted
|
||||
filename => insertedFilenames[filename] = opts.allowDuplicates || !(filename in insertedFilenames)).map( // parse the file (the file and css are conservatively cached)
|
||||
filename => parse(filename, commentsTransformer))).then(roots => {
|
||||
if (roots.length) {
|
||||
// combine all the library nodes returned by the parsed files
|
||||
const nodes = roots.reduce((all, root) => all.concat(root.nodes), []); // replace the import with all the library nodes
|
||||
|
||||
atrule.replaceWith(...nodes);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
return Promise.all([].concat( // promise the library imports are replaced with their contents
|
||||
promises, // promise certain libraries are prepended
|
||||
Promise.all([].concat(opts.forceImport || []).reduce( // filter the id to be a known id or boolean true
|
||||
(all, id) => {
|
||||
if (id === true) {
|
||||
all.push(...resolvedFilenamesById.normalize);
|
||||
} else if (typeof id === 'string') {
|
||||
const cssId = id.replace(cssExtRegExp$1, '');
|
||||
|
||||
if (cssId in resolvedFilenamesById) {
|
||||
all.push(...resolvedFilenamesById[cssId]);
|
||||
}
|
||||
}
|
||||
|
||||
return all;
|
||||
}, []).filter( // ignore filenames that have already been inserted
|
||||
filename => insertedFilenames[filename] = opts.allowDuplicates || !(filename in insertedFilenames)).map( // parse the file (the file and css are conservatively cached)
|
||||
filename => parse(filename, commentsTransformer))).then(roots => {
|
||||
if (roots.length) {
|
||||
// combine all the library nodes returned by the parsed files
|
||||
const nodes = roots.reduce((all, root) => all.concat(root.nodes), []); // prepend the stylesheet with all the library nodes
|
||||
|
||||
root.prepend(...nodes);
|
||||
}
|
||||
})));
|
||||
};
|
||||
|
||||
const cssExtRegExp$1 = /\.css\b/g;
|
||||
const importRegExp = /^import(?:-(normalize|sanitize))?$/;
|
||||
const paramsRegExp = /^\s*(?:url\((?:"(.+)"|'(.+)')\)|"(.+)"|'(.+)')[\W\w]*$/;
|
||||
|
||||
var index = postcss.plugin('postcss-normalize', opts => {
|
||||
opts = create(opts);
|
||||
const commentsTransformer = postcssBrowserComments(opts);
|
||||
const normalizeTransformer = postcssPlugin(commentsTransformer, opts);
|
||||
const postcssImportConfig = postcssImportNormalize(commentsTransformer);
|
||||
return assign(normalizeTransformer, {
|
||||
postcssImport: postcssImportConfig
|
||||
});
|
||||
});
|
||||
|
||||
export default index;
|
||||
//# sourceMappingURL=index.esm.mjs.map
|
1
web/node_modules/postcss-normalize/index.esm.mjs.map
generated
vendored
Normal file
1
web/node_modules/postcss-normalize/index.esm.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
71
web/node_modules/postcss-normalize/package.json
generated
vendored
Normal file
71
web/node_modules/postcss-normalize/package.json
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
"name": "postcss-normalize",
|
||||
"version": "8.0.1",
|
||||
"description": "Use the parts of normalize.css or sanitize.css you need from your browserslist",
|
||||
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
|
||||
"license": "CC0-1.0",
|
||||
"repository": "csstools/postcss-normalize",
|
||||
"homepage": "https://github.com/csstools/postcss-normalize#readme",
|
||||
"bugs": "https://github.com/csstools/postcss-normalize/issues",
|
||||
"main": "index.cjs.js",
|
||||
"module": "index.esm.mjs",
|
||||
"files": [
|
||||
"index.cjs.js",
|
||||
"index.cjs.js.map",
|
||||
"index.esm.mjs",
|
||||
"index.esm.mjs.map"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rollup --config .rollup.js --silent",
|
||||
"prepublishOnly": "npm test",
|
||||
"pretest:tape": "npm run build",
|
||||
"test": "npm run test:js && npm run test:tape",
|
||||
"test:js": "eslint src/{*,**/*}.js --cache --ignore-path .gitignore --quiet",
|
||||
"test:tape": "postcss-tape"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@csstools/normalize.css": "^10.1.0",
|
||||
"browserslist": "^4.6.2",
|
||||
"postcss": "^7.0.17",
|
||||
"postcss-browser-comments": "^3.0.0",
|
||||
"sanitize.css": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.4.5",
|
||||
"@babel/plugin-syntax-import-meta": "^7.2.0",
|
||||
"@babel/preset-env": "^7.4.5",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"eslint": "^5.16.0",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-tape": "^5.0.0",
|
||||
"pre-commit": "^1.2.2",
|
||||
"rollup": "^1.14.6",
|
||||
"rollup-plugin-babel": "^4.3.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"impliedStrict": true,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"root": true
|
||||
},
|
||||
"keywords": [
|
||||
"postcss",
|
||||
"css",
|
||||
"postcss-plugin",
|
||||
"normalizes",
|
||||
"browsers",
|
||||
"fixes"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue