postcss-normalize-charset 4.0.0-rc.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +7 -9
- package/package.json +6 -6
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -10,17 +10,15 @@ var _postcss2 = _interopRequireDefault(_postcss);
|
|
|
10
10
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
let charset = 'charset';
|
|
14
14
|
|
|
15
|
-
exports.default = _postcss2.default.plugin('postcss-normalize-' + charset,
|
|
16
|
-
|
|
15
|
+
exports.default = _postcss2.default.plugin('postcss-normalize-' + charset, (opts = {}) => {
|
|
16
|
+
return css => {
|
|
17
|
+
let charsetRule;
|
|
18
|
+
let nonAsciiNode;
|
|
19
|
+
let nonAscii = /[^\x00-\x7F]/;
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
var charsetRule = void 0;
|
|
20
|
-
var nonAsciiNode = void 0;
|
|
21
|
-
var nonAscii = /[^\x00-\x7F]/;
|
|
22
|
-
|
|
23
|
-
css.walk(function (node) {
|
|
21
|
+
css.walk(node => {
|
|
24
22
|
if (node.type === 'atrule' && node.name === charset) {
|
|
25
23
|
if (!charsetRule) {
|
|
26
24
|
charsetRule = node;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-normalize-charset",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Add necessary or remove extra charset with PostCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postcss",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"repository": "
|
|
16
|
+
"repository": "cssnano/cssnano",
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/cssnano/cssnano/issues"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://github.com/
|
|
20
|
+
"homepage": "https://github.com/cssnano/cssnano",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"postcss": "^6.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"babel-cli": "^6.0.0",
|
|
26
|
-
"cross-env": "^
|
|
26
|
+
"cross-env": "^5.0.0",
|
|
27
27
|
"postcss-devtools": "^1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"main": "dist/index.js",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
34
|
+
"node": ">=6.9.0"
|
|
35
35
|
}
|
|
36
36
|
}
|