postcss-discard-overridden
Advanced tools
Comparing version 0.1.1 to 4.0.0-rc.0
@@ -17,7 +17,7 @@ 'use strict'; | ||
function isOverridable(name) { | ||
return OVERRIDABLE_RULES.indexOf(_postcss2.default.vendor.unprefixed(name)) !== -1; | ||
return ~OVERRIDABLE_RULES.indexOf(_postcss2.default.vendor.unprefixed(name)); | ||
} | ||
function isScope(name) { | ||
return SCOPE_RULES.indexOf(_postcss2.default.vendor.unprefixed(name)) !== -1; | ||
return ~SCOPE_RULES.indexOf(_postcss2.default.vendor.unprefixed(name)); | ||
} | ||
@@ -41,9 +41,9 @@ | ||
var rules = []; | ||
css.walkAtRules(function (rule) { | ||
if (rule.type === 'atrule' && isOverridable(rule.name)) { | ||
var scope = getScope(rule); | ||
cache[scope] = rule; | ||
css.walkAtRules(function (node) { | ||
if (isOverridable(node.name)) { | ||
var scope = getScope(node); | ||
cache[scope] = node; | ||
rules.push({ | ||
node: rule, | ||
scope: scope | ||
node, | ||
scope | ||
}); | ||
@@ -50,0 +50,0 @@ } |
{ | ||
"name": "postcss-discard-overridden", | ||
"version": "0.1.1", | ||
"version": "4.0.0-rc.0", | ||
"description": "PostCSS plugin to discard overridden @keyframes or @counter-style.", | ||
@@ -16,30 +16,22 @@ "main": "dist/index.js", | ||
"license": "MIT", | ||
"repository": "Justineo/postcss-discard-overridden", | ||
"repository": "ben-eb/cssnano", | ||
"bugs": { | ||
"url": "https://github.com/Justineo/postcss-discard-overridden/issues" | ||
"url": "https://github.com/ben-eb/cssnano/issues" | ||
}, | ||
"homepage": "https://github.com/Justineo/postcss-discard-overridden", | ||
"homepage": "https://github.com/ben-eb/cssnano", | ||
"dependencies": { | ||
"postcss": "^5.0.16" | ||
"postcss": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.14.0", | ||
"babel-cli": "^6.7.7", | ||
"babel-plugin-add-module-exports": "^0.1.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-register": "^6.7.2", | ||
"eslint": "^2.1.0", | ||
"eslint-config-postcss": "^2.0.0" | ||
"babel-cli": "^6.0.0", | ||
"chalk": "^1.0.0", | ||
"cross-env": "^3.0.0", | ||
"diff": "^2.0.0" | ||
}, | ||
"scripts": { | ||
"test": "ava && eslint *.js" | ||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/" | ||
}, | ||
"eslintConfig": { | ||
"extends": "eslint-config-postcss/es5" | ||
}, | ||
"ava": { | ||
"require": [ | ||
"babel-register" | ||
] | ||
"engines": { | ||
"node": ">=4" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# PostCSS Discard Overridden [![Build Status][ci-img]][ci] | ||
# PostCSS Discard Overridden | ||
@@ -8,4 +8,2 @@ [PostCSS] plugin to discard overridden `@keyframes` or `@counter-style`. | ||
[PostCSS]: https://github.com/postcss/postcss | ||
[ci-img]: https://travis-ci.org/Justineo/postcss-discard-overridden.svg | ||
[ci]: https://travis-ci.org/Justineo/postcss-discard-overridden | ||
@@ -156,6 +154,7 @@ ```css | ||
```js | ||
postcss([ require('postcss-discard-overridden') ]) | ||
``` | ||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for | ||
examples for your environment. | ||
See [PostCSS] docs for examples for your environment. | ||
## Contributors | ||
See [CONTRIBUTORS.md](https://github.com/ben-eb/cssnano/blob/master/CONTRIBUTORS.md). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
12517
4
12
329
159
2
2
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedpostcss@6.0.23(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedjs-base64@2.6.4(transitive)
- Removedpostcss@5.2.18(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.03.2.3(transitive)
Updatedpostcss@^6.0.0