grunt-autoprefixer
Advanced tools
Comparing version 2.2.0 to 3.0.0
{ | ||
"name": "grunt-autoprefixer", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "Parse CSS and add vendor-prefixed CSS properties using the Can I Use database. Based on Autoprefixer.", | ||
@@ -29,5 +29,5 @@ "author": { | ||
"dependencies": { | ||
"autoprefixer-core": "^5.0.0", | ||
"diff": "~1.2.1", | ||
"chalk": "~0.5.0" | ||
"autoprefixer-core": "^5.1.7", | ||
"diff": "~1.3.0", | ||
"chalk": "~1.0.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
@@ -103,17 +103,5 @@ # grunt-autoprefixer | ||
* `inline` (boolean): whether a sourcemap will be inlined or not. By default, it will be the same as a previous sourcemap or inlined. | ||
* `annotation` (boolean or string): set this option to `true` or `false` to enable or disable annotation comments. You can also overwrite an output sourcemap path using this option, e.g. `path/file.css.map` (by default, Autoprefixer will save your sourcemap to a directory where you save CSS). This option requires `inline` to be `false` or undefined. | ||
* `annotation` (string): set this option to URL path you wish the annotation comment to be e.g. `path/file.css.map` (by default, Autoprefixer will save your sourcemap to a directory where you save CSS). This option requires `inline` to be `false` or undefined. | ||
* `sourcesContent` (boolean): whether original contents (e.g. Sass sources) will be included to a sourcemap. By default, Autoprefixer will add contents only for new sourcemaps or if a previous sourcemap has them. | ||
#### options.silent | ||
Type: `Boolean` | ||
Default value: `false` | ||
If the `silent` option is enabled, logging to the stdout will be suppressed. | ||
```js | ||
options: { | ||
silent: true | ||
} | ||
``` | ||
#### options.safe | ||
@@ -152,3 +140,3 @@ Type: `Boolean` | ||
// prefix all files | ||
multiple_files: { | ||
multiple_files: [{ | ||
expand: true, | ||
@@ -158,3 +146,3 @@ flatten: true, | ||
dest: 'dest/css/' // -> dest/css/file1.css, dest/css/file2.css | ||
}, | ||
}], | ||
@@ -161,0 +149,0 @@ // if you have specified only the `src` param, the destination will be set automatically, |
@@ -39,3 +39,3 @@ 'use strict'; | ||
inline: (typeof options.map.inline === 'boolean') ? options.map.inline : true, | ||
annotation: (typeof options.map.annotation === 'boolean') ? options.map.annotation : true, | ||
annotation: (typeof options.map.annotation === 'string') ? options.map.annotation : true, | ||
sourcesContent: (typeof options.map.sourcesContent === 'boolean') ? options.map.sourcesContent : true | ||
@@ -53,5 +53,3 @@ }, | ||
function log(msg) { | ||
if (!options.silent) { | ||
grunt.log.writeln(msg); | ||
} | ||
grunt.verbose.writeln(msg); | ||
} | ||
@@ -65,3 +63,2 @@ | ||
map: false, | ||
silent: false, | ||
remove: true, | ||
@@ -71,2 +68,8 @@ safe: false | ||
var tally = { | ||
sheets: 0, | ||
maps: 0, | ||
diffs: 0 | ||
}; | ||
prefixer = autoprefixer({browsers: options.browsers, cascade: options.cascade, remove: options.remove}); | ||
@@ -79,4 +82,4 @@ | ||
f.src | ||
.forEach(function(filepath) { | ||
try { | ||
f.src.forEach(function(filepath) { | ||
var dest = f.dest || filepath; | ||
@@ -88,2 +91,3 @@ var input = grunt.file.read(filepath); | ||
log('File ' + chalk.cyan(dest) + ' created.'); | ||
tally.sheets++; | ||
@@ -93,2 +97,3 @@ if (output.map) { | ||
log('File ' + chalk.cyan(dest + '.map') + ' created (source map).'); | ||
tally.maps++; | ||
} | ||
@@ -101,6 +106,22 @@ | ||
log('File ' + chalk.cyan(diffPath) + ' created (diff).'); | ||
tally.diffs++; | ||
} | ||
}); | ||
} catch (e) { | ||
grunt.fail.fatal(e); | ||
} | ||
}); | ||
if (tally.sheets) { | ||
grunt.log.ok(tally.sheets + ' ' + 'autoprefixed ' + grunt.util.pluralize(tally.sheets, 'stylesheet/stylesheets') + ' created.'); | ||
} | ||
if (tally.maps) { | ||
grunt.log.ok(tally.maps + ' ' + grunt.util.pluralize(tally.maps, 'sourcemap/sourcemaps') + ' created.'); | ||
} | ||
if (tally.diffs) { | ||
grunt.log.ok(tally.diffs + ' ' + grunt.util.pluralize(tally.diffs, 'diff/diffs') + ' created.'); | ||
} | ||
}); | ||
}; |
Sorry, the diff of this file is not supported yet
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
14221
100
192
+ Addedansi-regex@1.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.0.0(transitive)
+ Addeddiff@1.3.2(transitive)
+ Addedget-stdin@4.0.1(transitive)
+ Addedhas-ansi@1.0.3(transitive)
+ Addedstrip-ansi@2.0.1(transitive)
+ Addedsupports-color@1.3.1(transitive)
- Removedansi-regex@0.2.1(transitive)
- Removedansi-styles@1.1.0(transitive)
- Removedchalk@0.5.1(transitive)
- Removeddiff@1.2.2(transitive)
- Removedhas-ansi@0.1.0(transitive)
- Removedstrip-ansi@0.3.0(transitive)
- Removedsupports-color@0.2.0(transitive)
Updatedautoprefixer-core@^5.1.7
Updatedchalk@~1.0.0
Updateddiff@~1.3.0