Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit a1aaa18

Browse files
committed
Merge pull request #5 from jedmao/postcss-5.0
Upgrade to Postcss 5.x
2 parents 4ba0ec6 + f9b1533 commit a1aaa18

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var DECIMAL_PRECISION = 100000 // 5 decimals
1616
*/
1717
module.exports = postcss.plugin("postcss-color-hex-alpha", function() {
1818
return function(style) {
19-
style.eachDecl(function transformDecl(decl) {
19+
style.walkDecls(function transformDecl(decl) {
2020
if (!decl.value || decl.value.indexOf("#") === -1) {
2121
return
2222
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"dependencies": {
2626
"color": "^0.10.1",
27-
"postcss": "^4.1.16",
27+
"postcss": "^5.0.4",
2828
"postcss-message-helpers": "^2.0.0"
2929
},
3030
"devDependencies": {
@@ -33,7 +33,9 @@
3333
"tape": "^4.0.3"
3434
},
3535
"scripts": {
36-
"lint": "jscs *.js **/*.js && jshint . --exclude-path .gitignore",
36+
"lint": "npm run jscs && npm run jshint",
37+
"jscs": "jscs index.js test/index.js",
38+
"jshint": "jshint . --exclude-path .gitignore",
3739
"test": "npm run lint && tape test"
3840
}
3941
}

0 commit comments

Comments
 (0)