initial commit
This commit is contained in:
18
node_modules/postcss-normalize-charset/CHANGELOG.md
generated
vendored
Normal file
18
node_modules/postcss-normalize-charset/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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.
|
||||
|
||||
# 1.1.1
|
||||
|
||||
* Performance tweaks; test that `node.parent` is equal to the AST rather than
|
||||
checking its type is `root`, and use the AST directly to prepend the
|
||||
`@charset` to, rather than using the superfluous `root()` method.
|
||||
|
||||
# 1.1.0
|
||||
|
||||
* Added `add` option (thanks to @ben-eb)
|
||||
|
||||
# 1.0.0
|
||||
|
||||
* Initial release.
|
||||
20
node_modules/postcss-normalize-charset/LICENSE
generated
vendored
Normal file
20
node_modules/postcss-normalize-charset/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2015 Bogdan Chadkin <trysound@yandex.ru>
|
||||
|
||||
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.
|
||||
43
node_modules/postcss-normalize-charset/README.md
generated
vendored
Normal file
43
node_modules/postcss-normalize-charset/README.md
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# postcss-normalize-charset
|
||||
|
||||
Add necessary or remove extra charset with PostCSS
|
||||
|
||||
```css
|
||||
a{
|
||||
content: "©";
|
||||
}
|
||||
```
|
||||
|
||||
```css
|
||||
@charset "utf-8";
|
||||
a{
|
||||
content: "©";
|
||||
}
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### normalizeCharset([options])
|
||||
|
||||
#### options
|
||||
|
||||
##### add
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
Pass `false` to stop the module from adding a `@charset` declaration if it was
|
||||
missing from the file (and the file contained non-ascii characters).
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)
|
||||
46
node_modules/postcss-normalize-charset/dist/index.js
generated
vendored
Normal file
46
node_modules/postcss-normalize-charset/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
let charset = 'charset';
|
||||
|
||||
exports.default = _postcss2.default.plugin('postcss-normalize-' + charset, (opts = {}) => {
|
||||
return css => {
|
||||
let charsetRule;
|
||||
let nonAsciiNode;
|
||||
let nonAscii = /[^\x00-\x7F]/;
|
||||
|
||||
css.walk(node => {
|
||||
if (node.type === 'atrule' && node.name === charset) {
|
||||
if (!charsetRule) {
|
||||
charsetRule = node;
|
||||
}
|
||||
node.remove();
|
||||
} else if (!nonAsciiNode && node.parent === css && nonAscii.test(node)) {
|
||||
nonAsciiNode = node;
|
||||
}
|
||||
});
|
||||
|
||||
if (nonAsciiNode) {
|
||||
if (!charsetRule && opts.add !== false) {
|
||||
charsetRule = _postcss2.default.atRule({
|
||||
name: charset,
|
||||
params: '"utf-8"'
|
||||
});
|
||||
}
|
||||
if (charsetRule) {
|
||||
charsetRule.source = nonAsciiNode.source;
|
||||
css.prepend(charsetRule);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
67
node_modules/postcss-normalize-charset/package.json
generated
vendored
Normal file
67
node_modules/postcss-normalize-charset/package.json
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"_from": "postcss-normalize-charset@^4.0.1",
|
||||
"_id": "postcss-normalize-charset@4.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==",
|
||||
"_location": "/postcss-normalize-charset",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "postcss-normalize-charset@^4.0.1",
|
||||
"name": "postcss-normalize-charset",
|
||||
"escapedName": "postcss-normalize-charset",
|
||||
"rawSpec": "^4.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano-preset-default"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz",
|
||||
"_shasum": "8b35add3aee83a136b0471e0d59be58a50285dd4",
|
||||
"_spec": "postcss-normalize-charset@^4.0.1",
|
||||
"_where": "D:\\Air66 Files\\dev_sites\\www.airurl.dev.cc\\user\\plugins\\air66Theme\\node_modules\\cssnano-preset-default",
|
||||
"author": {
|
||||
"name": "Bogdan Chadkin",
|
||||
"email": "trysound@yandex.ru"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"postcss": "^7.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Add necessary or remove extra charset with PostCSS",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.0.0",
|
||||
"cross-env": "^5.0.0",
|
||||
"postcss-devtools": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"keywords": [
|
||||
"postcss",
|
||||
"css",
|
||||
"postcss-plugin",
|
||||
"charset"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"name": "postcss-normalize-charset",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/cssnano/cssnano.git"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
||||
},
|
||||
"version": "4.0.1"
|
||||
}
|
||||
Reference in New Issue
Block a user