builder-autoprefixer
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -0,2 +1,6 @@ | ||
1.0.4 / 2014-10-11 | ||
================== | ||
* Switch / update to autoprefixer-core 3.1.1 | ||
1.0.2 / 2014-06-17 | ||
@@ -3,0 +7,0 @@ ================== |
22
index.js
@@ -1,2 +0,2 @@ | ||
var autoprefix = require('autoprefixer'); | ||
var autoprefix = require('autoprefixer-core'); | ||
var crypto = require('crypto'); | ||
@@ -8,7 +8,15 @@ | ||
options = options || {}; | ||
var auto = autoprefix; | ||
var prefixerOptions = { | ||
cascade: true | ||
}; | ||
var browsers = options.browsers; | ||
if (Array.isArray(browsers)) browsers = browsers.join(', '); | ||
if (browsers) auto = autoprefix(browsers); | ||
else browsers = ''; | ||
if (browsers != null) { | ||
if (browsers === '') { | ||
browsers = []; | ||
} | ||
else if (!Array.isArray(browsers)) { | ||
browsers = browsers.split(',').map(function(i) {return i.trim()}); | ||
} | ||
prefixerOptions.browsers = browsers; | ||
} | ||
@@ -19,6 +27,6 @@ return function autoprefixer(file, done) { | ||
if (err) return done(err); | ||
var hash = browsers + calculate(string); | ||
var hash = (browsers||[]).join(',') + calculate(string); | ||
var res; | ||
try { | ||
res = cache[hash] = cache[hash] || auto.process(string); | ||
res = cache[hash] = cache[hash] || autoprefix(prefixerOptions).process(string); | ||
} catch (err) { | ||
@@ -25,0 +33,0 @@ done(err); |
{ | ||
"name": "builder-autoprefixer", | ||
"description": "autoprefixer plugin for component-builder2.js", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": { | ||
@@ -13,4 +13,4 @@ "name": "Jonathan Ong", | ||
"dependencies": { | ||
"autoprefixer": "^1.0.0" | ||
"autoprefixer-core": "^3.1.1" | ||
} | ||
} |
# Builder Autoprefixer | ||
Autoprefixer plugin for [builder2.js](https://github.com/componentjs/builder2.js). Caches to create incremental builds. | ||
Autoprefixer plugin for [builder2.js](https://github.com/componentjs/builder2.js). Caches to create incremental builds. Based on [postcss/autoprefixer-core](https://github.com/postcss/autoprefixer-core). | ||
@@ -13,6 +13,9 @@ ## API | ||
.use('styles', | ||
autoprefix({ browsers: 'last 2 versions' })) | ||
autoprefix({ browsers: ['last 2 version'] })) | ||
.pipe(process.stdout) | ||
``` | ||
If you provide the `options` argument as a string, use comma as seperator for multiple options. | ||
To disable autoprefixer pass an empty string. | ||
## License | ||
@@ -19,0 +22,0 @@ |
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
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
3984
40
43
0
+ Addedautoprefixer-core@^3.1.1
+ Addedautoprefixer-core@3.1.2(transitive)
+ Addedjs-base64@2.1.9(transitive)
+ Addedpostcss@2.2.6(transitive)
- Removedautoprefixer@^1.0.0
- Removedautoprefixer@1.3.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase64-js@0.0.8(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs-extra@0.9.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjsonfile@1.1.1(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedncp@0.5.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpostcss@0.3.5(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedwrappy@1.0.2(transitive)