css-variables-loader
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "css-variables-loader", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Load CSS variables with Webpack", | ||
@@ -21,3 +21,3 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"ava": "^0.13.0" | ||
"ava": "^0.16.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "dependencies": { |
@@ -8,5 +8,5 @@ var css = require('css'); | ||
.forEach(rule => rule.declarations | ||
.filter(decl => decl.property.indexOf('--') === 0) | ||
.filter(decl => decl.type === 'declaration' && decl.property.indexOf('--') === 0) | ||
.forEach(decl => result[decl.property] = decl.value)); | ||
return 'module.exports = ' + JSON.stringify(result); | ||
}; |
@@ -11,3 +11,3 @@ /* eslint no-eval: 0 */ | ||
eval(loader(css)); | ||
t.same(module.exports, result); | ||
t.deepEqual(module.exports, result); | ||
}); | ||
@@ -34,1 +34,4 @@ }; | ||
{ '--theme': 'red' }) | ||
check('should not break when there is a comment', | ||
':root { --theme: red; /* important info */ --accent: blue }', | ||
{ '--accent': 'blue', '--theme': 'red' }) |
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
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
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
20801
13
43
2