flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
109
BACK_BACK/node_modules/postcss-normalize-url/CHANGELOG.md
generated
vendored
Executable file
109
BACK_BACK/node_modules/postcss-normalize-url/CHANGELOG.md
generated
vendored
Executable file
|
|
@ -0,0 +1,109 @@
|
|||
# 4.0.0-rc.0
|
||||
|
||||
* Breaking: Drops support for Node 0.12, we now require at least Node 4.
|
||||
* Breaking: Update PostCSS to 6.0.0.
|
||||
* Breaking: `stripWWW` is now set to `false` by default.
|
||||
|
||||
# 3.0.8
|
||||
|
||||
* Fixes `@namespace` URL conversion; now the semantics of the URL are preserved
|
||||
and only the `url(foo)` to `"foo"` optimisation is performed.
|
||||
|
||||
# 3.0.7
|
||||
|
||||
* Fix `main` field in `package.json`.
|
||||
|
||||
# 3.0.6
|
||||
|
||||
* Now compiled with Babel 6.
|
||||
|
||||
# 3.0.5
|
||||
|
||||
* Fixes an issue where base64 encoded OpenType font urls were being erroneously
|
||||
converted by the module (thanks to @ln-e).
|
||||
|
||||
# 3.0.4
|
||||
|
||||
* Fixes incorrect minification of empty non-url functions.
|
||||
|
||||
# 3.0.3
|
||||
|
||||
* Updates postcss-value-parser to version 3 (thanks to @TrySound).
|
||||
|
||||
# 3.0.2
|
||||
|
||||
* Fixes incorrect minification of chrome-extension urls.
|
||||
|
||||
# 3.0.1
|
||||
|
||||
* Bump postcss-value-parser to `2.0.2`.
|
||||
|
||||
# 3.0.0
|
||||
|
||||
* Upgraded to PostCSS 5.
|
||||
|
||||
# 2.1.3
|
||||
|
||||
* Replaces trim space nodes function with a built in method
|
||||
of postcss-value-parser.
|
||||
|
||||
# 2.1.2
|
||||
|
||||
* postcss-normalize-url now uses postcss-value-parser to iterate
|
||||
url values (thanks to @TrySound).
|
||||
* Fixed `@namespace` URL reduction behaviour. (thanks to @TrySound).
|
||||
|
||||
# 2.1.1
|
||||
|
||||
* Increased performance by using a single call to `eachInside` rather than two.
|
||||
|
||||
# 2.1.0
|
||||
|
||||
* Adds `keepWWW` option.
|
||||
* Compatibility fixes for `is-absolute-url@2.0.0`.
|
||||
|
||||
# 2.0.3
|
||||
|
||||
* Fixes an issue where embedded base 64 data was being converted as if it were
|
||||
a URL.
|
||||
|
||||
# 2.0.2
|
||||
|
||||
* Addresses an issue where relative path separators were converted to
|
||||
backslashes on Windows.
|
||||
|
||||
# 2.0.1
|
||||
|
||||
* Documentation/metadata tweaks for plugin guidelines compatibility.
|
||||
* Bump css-list to 0.1.0, use instead of postcss.list.space for namespace
|
||||
rule normalization.
|
||||
|
||||
# 2.0.0
|
||||
|
||||
* Improved URL detection when using two or more in the same declaration.
|
||||
* node 0.10 is no longer supported.
|
||||
|
||||
# 1.2.1
|
||||
|
||||
* Patch to address incorrect transformation of `@document` rules.
|
||||
|
||||
# 1.2.0
|
||||
|
||||
* Fixes an issue where options could not be passed through.
|
||||
* Support for normalising URLs in `@namespace` rules.
|
||||
|
||||
# 1.1.0
|
||||
|
||||
* Now uses the PostCSS `4.1` plugin API.
|
||||
|
||||
# 1.0.2
|
||||
|
||||
* Adds a JSHint config, code tidied up.
|
||||
|
||||
# 1.0.1
|
||||
|
||||
* Bug fix; does not transform embedded base 64 or svg images.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
* Initial release.
|
||||
22
BACK_BACK/node_modules/postcss-normalize-url/LICENSE-MIT
generated
vendored
Executable file
22
BACK_BACK/node_modules/postcss-normalize-url/LICENSE-MIT
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
55
BACK_BACK/node_modules/postcss-normalize-url/README.md
generated
vendored
Executable file
55
BACK_BACK/node_modules/postcss-normalize-url/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
# [postcss][postcss]-normalize-url
|
||||
|
||||
> [Normalize URLs](https://github.com/sindresorhus/normalize-url) with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-normalize-url) do:
|
||||
|
||||
```
|
||||
npm install postcss-normalize-url --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
h1 {
|
||||
background: url("http://site.com:80/image.jpg")
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
h1 {
|
||||
background: url(http://site.com/image.jpg)
|
||||
}
|
||||
```
|
||||
|
||||
Note that this module will also try to normalize relative URLs, and is capable
|
||||
of stripping unnecessary quotes. For more examples, see the [tests](test.js).
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
## API
|
||||
|
||||
### normalize([options])
|
||||
|
||||
Please see the [normalize-url documentation][docs]. By default,
|
||||
`normalizeProtocol`, `stripFragment` & `stripWWW` are set to `false`.
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
[docs]: https://github.com/sindresorhus/normalize-url#options
|
||||
[postcss]: https://github.com/postcss/postcss
|
||||
122
BACK_BACK/node_modules/postcss-normalize-url/dist/index.js
generated
vendored
Executable file
122
BACK_BACK/node_modules/postcss-normalize-url/dist/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,122 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _path = require('path');
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _normalizeUrl = require('normalize-url');
|
||||
|
||||
var _normalizeUrl2 = _interopRequireDefault(_normalizeUrl);
|
||||
|
||||
var _isAbsoluteUrl = require('is-absolute-url');
|
||||
|
||||
var _isAbsoluteUrl2 = _interopRequireDefault(_isAbsoluteUrl);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const multiline = /\\[\r\n]/;
|
||||
const escapeChars = /([\s\(\)"'])/g;
|
||||
|
||||
function convert(url, options) {
|
||||
if ((0, _isAbsoluteUrl2.default)(url) || url.startsWith('//')) {
|
||||
let normalizedURL = null;
|
||||
|
||||
try {
|
||||
normalizedURL = (0, _normalizeUrl2.default)(url, options);
|
||||
} catch (e) {
|
||||
normalizedURL = url;
|
||||
}
|
||||
|
||||
return normalizedURL;
|
||||
}
|
||||
|
||||
// `path.normalize` always returns backslashes on Windows, need replace in `/`
|
||||
return _path2.default.normalize(url).replace(new RegExp('\\' + _path2.default.sep, 'g'), '/');
|
||||
}
|
||||
|
||||
function transformNamespace(rule) {
|
||||
rule.params = (0, _postcssValueParser2.default)(rule.params).walk(node => {
|
||||
if (node.type === 'function' && node.value.toLowerCase() === 'url' && node.nodes.length) {
|
||||
node.type = 'string';
|
||||
node.quote = node.nodes[0].quote || '"';
|
||||
node.value = node.nodes[0].value;
|
||||
}
|
||||
if (node.type === 'string') {
|
||||
node.value = node.value.trim();
|
||||
}
|
||||
return false;
|
||||
}).toString();
|
||||
}
|
||||
|
||||
function transformDecl(decl, opts) {
|
||||
decl.value = (0, _postcssValueParser2.default)(decl.value).walk(node => {
|
||||
if (node.type !== 'function' || node.value.toLowerCase() !== 'url' || !node.nodes.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let url = node.nodes[0];
|
||||
let escaped;
|
||||
|
||||
node.before = node.after = '';
|
||||
url.value = url.value.trim().replace(multiline, '');
|
||||
|
||||
// Skip empty URLs
|
||||
// Empty URL function equals request to current stylesheet where it is declared
|
||||
if (url.value.length === 0) {
|
||||
url.quote = '';
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/^data:(.*)?,/i.test(url.value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!/^.+-extension:\//i.test(url.value)) {
|
||||
url.value = convert(url.value, opts);
|
||||
}
|
||||
|
||||
if (escapeChars.test(url.value) && url.type === 'string') {
|
||||
escaped = url.value.replace(escapeChars, '\\$1');
|
||||
if (escaped.length < url.value.length + 2) {
|
||||
url.value = escaped;
|
||||
url.type = 'word';
|
||||
}
|
||||
} else {
|
||||
url.type = 'word';
|
||||
}
|
||||
|
||||
return false;
|
||||
}).toString();
|
||||
}
|
||||
|
||||
exports.default = _postcss2.default.plugin('postcss-normalize-url', opts => {
|
||||
opts = Object.assign({}, {
|
||||
normalizeProtocol: false,
|
||||
stripFragment: false,
|
||||
stripWWW: false
|
||||
}, opts);
|
||||
|
||||
return css => {
|
||||
css.walk(node => {
|
||||
if (node.type === 'decl') {
|
||||
return transformDecl(node, opts);
|
||||
} else if (node.type === 'atrule' && node.name.toLowerCase() === 'namespace') {
|
||||
return transformNamespace(node);
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
46
BACK_BACK/node_modules/postcss-normalize-url/package.json
generated
vendored
Executable file
46
BACK_BACK/node_modules/postcss-normalize-url/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "postcss-normalize-url",
|
||||
"version": "4.0.1",
|
||||
"description": "Normalize URLs with PostCSS",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
"LICENSE-MIT"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"normalize",
|
||||
"optimise",
|
||||
"optimisation",
|
||||
"postcss",
|
||||
"postcss-plugin",
|
||||
"url"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-absolute-url": "^2.0.0",
|
||||
"normalize-url": "^3.0.0",
|
||||
"postcss": "^7.0.0",
|
||||
"postcss-value-parser": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.0.0",
|
||||
"cross-env": "^5.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"repository": "cssnano/cssnano",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue