diff --git a/index.js b/index.js index 61894f8..69563f3 100755 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ for (var prop in fontVariantProperties) { // create if does not exist function getFontFeatureSettingsPrevTo(decl) { var fontFeatureSettings = null; - decl.parent.eachDecl(function(decl) { + decl.parent.walkDecls(function(decl) { if (decl.prop === "font-feature-settings") { fontFeatureSettings = decl; } @@ -88,10 +88,10 @@ function getFontFeatureSettingsPrevTo(decl) { */ module.exports = postcss.plugin("postcss-font-variant", function() { return function(styles) { - styles.eachRule(function(rule) { + styles.walkRules(function(rule) { var fontFeatureSettings = null // read custom media queries - rule.eachDecl(function(decl) { + rule.walkDecls(function(decl) { if (!fontVariantProperties[decl.prop]) { return null } diff --git a/package.json b/package.json index a7c9b47..d7270b9 100755 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "index.js" ], "dependencies": { - "postcss": "^4.1.16" + "postcss": "^5.0.4" }, "devDependencies": { "jscs": "^2.1.0", @@ -30,7 +30,9 @@ "tape": "^4.0.3" }, "scripts": { - "lint": "jscs *.js **/*.js && jshint . --exclude-path .gitignore", + "lint": "npm run jscs && npm run jshint", + "jscs": "jscs index.js test/index.js", + "jshint": "jshint . --exclude-path .gitignore", "test": "npm run lint && tape test" } }