stylehacks 2.1.0 → 2.3.2
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/CHANGELOG.md +27 -0
- package/README.md +12 -5
- package/dist/cli.js +69 -0
- package/dist/dictionary/browsers.js +9 -0
- package/dist/dictionary/identifiers.js +7 -0
- package/dist/dictionary/postcss.js +6 -0
- package/dist/dictionary/tags.js +5 -0
- package/dist/exists.js +4 -8
- package/dist/formatter.js +13 -15
- package/dist/index.js +53 -42
- package/dist/isMixin.js +14 -0
- package/dist/plugin.js +64 -67
- package/dist/plugins/bodyEmpty.js +24 -12
- package/dist/plugins/htmlCombinatorCommentBody.js +26 -12
- package/dist/plugins/htmlFirstChild.js +24 -12
- package/dist/plugins/important.js +12 -9
- package/dist/plugins/leadingStar.js +43 -38
- package/dist/plugins/leadingUnderscore.js +14 -8
- package/dist/plugins/mediaSlash0.js +13 -8
- package/dist/plugins/mediaSlash9.js +13 -8
- package/dist/plugins/slash9.js +26 -0
- package/dist/plugins/starHtml.js +24 -12
- package/dist/plugins/trailingSlashComma.js +24 -12
- package/package.json +42 -17
- package/{bin/usage.txt → usage.txt} +0 -0
- package/bin/cmd.js +0 -49
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stylehacks",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Detect/remove browser hacks from CSS files.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"stylehacks": "
|
|
7
|
+
"stylehacks": "dist/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"bin",
|
|
11
10
|
"LICENSE-MIT",
|
|
12
|
-
"dist"
|
|
11
|
+
"dist",
|
|
12
|
+
"usage.txt"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
15
|
+
"pretest": "eslint src",
|
|
16
|
+
"prepublish": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/",
|
|
17
|
+
"report": "nyc report --reporter=html",
|
|
18
|
+
"test": "nyc ava src/__tests__",
|
|
19
|
+
"test-012": "nyc ava src/__tests__"
|
|
18
20
|
},
|
|
19
21
|
"keywords": [
|
|
20
22
|
"browsers",
|
|
@@ -28,10 +30,20 @@
|
|
|
28
30
|
],
|
|
29
31
|
"license": "MIT",
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"
|
|
32
|
-
"babel-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"ava": "^0.17.0",
|
|
34
|
+
"babel-cli": "^6.5.1",
|
|
35
|
+
"babel-core": "^6.5.2",
|
|
36
|
+
"babel-plugin-add-module-exports": "^0.2.0",
|
|
37
|
+
"babel-preset-es2015": "^6.5.0",
|
|
38
|
+
"babel-preset-es2015-loose": "^7.0.0",
|
|
39
|
+
"babel-preset-stage-0": "^6.5.0",
|
|
40
|
+
"babel-register": "^6.9.0",
|
|
41
|
+
"del-cli": "^0.2.0",
|
|
42
|
+
"eslint": "^3.0.0",
|
|
43
|
+
"eslint-config-cssnano": "^3.0.0",
|
|
44
|
+
"eslint-plugin-babel": "^3.3.0",
|
|
45
|
+
"eslint-plugin-import": "^2.0.1",
|
|
46
|
+
"nyc": "^10.0.0"
|
|
35
47
|
},
|
|
36
48
|
"homepage": "https://github.com/ben-eb/stylehacks",
|
|
37
49
|
"author": {
|
|
@@ -41,16 +53,29 @@
|
|
|
41
53
|
},
|
|
42
54
|
"repository": "ben-eb/stylehacks",
|
|
43
55
|
"dependencies": {
|
|
44
|
-
"browserslist": "^1.
|
|
56
|
+
"browserslist": "^1.1.3",
|
|
45
57
|
"chalk": "^1.1.1",
|
|
46
58
|
"log-symbols": "^1.0.2",
|
|
47
59
|
"minimist": "^1.2.0",
|
|
48
|
-
"plur": "^2.
|
|
49
|
-
"postcss": "^5.0.
|
|
50
|
-
"postcss-reporter": "^1.
|
|
51
|
-
"postcss-selector-parser": "^
|
|
52
|
-
"read-file-stdin": "^0.2.
|
|
60
|
+
"plur": "^2.1.2",
|
|
61
|
+
"postcss": "^5.0.18",
|
|
62
|
+
"postcss-reporter": "^1.3.3",
|
|
63
|
+
"postcss-selector-parser": "^2.0.0",
|
|
64
|
+
"read-file-stdin": "^0.2.1",
|
|
53
65
|
"text-table": "^0.2.0",
|
|
54
66
|
"write-file-stdout": "0.0.2"
|
|
67
|
+
},
|
|
68
|
+
"eslintConfig": {
|
|
69
|
+
"extends": "cssnano"
|
|
70
|
+
},
|
|
71
|
+
"ava": {
|
|
72
|
+
"require": "babel-register"
|
|
73
|
+
},
|
|
74
|
+
"nyc": {
|
|
75
|
+
"exclude": [
|
|
76
|
+
"dist",
|
|
77
|
+
"node_modules",
|
|
78
|
+
"src/__tests__"
|
|
79
|
+
]
|
|
55
80
|
}
|
|
56
81
|
}
|
|
File without changes
|
package/bin/cmd.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
var fs = require('fs');
|
|
4
|
-
var stylehacks = require('../dist');
|
|
5
|
-
var read = require('read-file-stdin');
|
|
6
|
-
var write = require('write-file-stdout');
|
|
7
|
-
|
|
8
|
-
var opts = require('minimist')(process.argv.slice(2), {
|
|
9
|
-
alias: {
|
|
10
|
-
b: 'browsers',
|
|
11
|
-
l: 'lint',
|
|
12
|
-
h: 'help',
|
|
13
|
-
s: 'sourcemap',
|
|
14
|
-
v: 'version'
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
if (opts.version) {
|
|
19
|
-
return console.log(require('../package.json').version);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var file = opts._[0];
|
|
23
|
-
var out = opts._[1];
|
|
24
|
-
|
|
25
|
-
if (file === 'help' || opts.help) {
|
|
26
|
-
return fs.createReadStream(__dirname + '/usage.txt')
|
|
27
|
-
.pipe(process.stdout)
|
|
28
|
-
.on('close', function () { process.exit(1); });
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
read(file, function (err, buf) {
|
|
32
|
-
if (err) {
|
|
33
|
-
throw err;
|
|
34
|
-
}
|
|
35
|
-
if (file) {
|
|
36
|
-
opts.from = file;
|
|
37
|
-
}
|
|
38
|
-
if (out) {
|
|
39
|
-
opts.to = out;
|
|
40
|
-
}
|
|
41
|
-
stylehacks.process(String(buf), opts).then(function (result) {
|
|
42
|
-
if (result.warnings().length) {
|
|
43
|
-
process.exit(1);
|
|
44
|
-
}
|
|
45
|
-
if (!opts.lint) {
|
|
46
|
-
write(result.css);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|