Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-contrib-cssmin

Package Overview
Dependencies
Maintainers
7
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-cssmin - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

42

package.json
{
"name": "grunt-contrib-cssmin",
"description": "Compress CSS files.",
"version": "0.10.0",
"homepage": "https://github.com/gruntjs/grunt-contrib-cssmin",
"description": "Minify CSS",
"version": "0.11.0",
"author": {

@@ -10,9 +9,3 @@ "name": "Grunt Team",

},
"repository": {
"type": "git",
"url": "git://github.com/gruntjs/grunt-contrib-cssmin.git"
},
"bugs": {
"url": "https://github.com/gruntjs/grunt-contrib-cssmin/issues"
},
"repository": "gruntjs/grunt-contrib-cssmin",
"licenses": [

@@ -25,3 +18,3 @@ {

"engines": {
"node": ">= 0.8.0"
"node": ">=0.10.0"
},

@@ -32,19 +25,26 @@ "scripts": {

"dependencies": {
"chalk": "~0.4.0",
"clean-css": "~2.2.0",
"maxmin": "~0.2.0"
"chalk": "^0.5.1",
"clean-css": "^3.0.1",
"maxmin": "^1.0.0"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-nodeunit": "~0.4.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-internal": "~0.4.6",
"grunt": "~0.4.1"
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-internal": "^0.4.6",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-nodeunit": "^0.4.0"
},
"peerDependencies": {
"grunt": "~0.4.1"
"grunt": ">=0.4.0"
},
"keywords": [
"gruntplugin",
"cssmin"
"cssmin",
"css",
"style",
"styles",
"stylesheet",
"minify",
"compress"
],

@@ -51,0 +51,0 @@ "files": [

@@ -1,4 +0,4 @@

# grunt-contrib-cssmin v0.10.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-cssmin.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-cssmin) <a href="https://ci.appveyor.com/project/gruntjs/grunt-contrib-cssmin"><img src="https://ci.appveyor.com/api/projects/status/ntgfqc3ppk533m84/branch/master" alt="Build Status: Windows" height="18" /></a>
# grunt-contrib-cssmin v0.11.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-cssmin.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-cssmin) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ntgfqc3ppk533m84/branch/master)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-cssmin/branch/master)
> Compress CSS files.
> Minify CSS

@@ -8,3 +8,3 @@

## Getting Started
This plugin requires Grunt `~0.4.1`
This plugin requires Grunt `>=0.4.0`

@@ -23,3 +23,3 @@ If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-cssmin/tree/grunt-0.3-stable).*
**Issues with the output should be reported on the clean-css [issue tracker](https://github.com/GoalSmashers/clean-css/issues).**

@@ -31,29 +31,17 @@

Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
Files are compressed with [clean-css](https://github.com/GoalSmashers/clean-css).
### Options
#### banner
Options are passed to [clean-css](https://github.com/jakubpawlowicz/clean-css#how-to-use-clean-css-programmatically). In addition this task defines an extra option:
Type: `String`
Default: `null`
Prefix the compressed source with the given banner, with a linebreak inbetween.
#### report
#### keepSpecialComments
Type: `String` `Number`
Default: `'*'`
To keep or remove special comments, exposing the underlying option from [clean-css](https://github.com/GoalSmashers/clean-css). `'*'` for keeping all (default), `1` for keeping first one, `0` for removing all.
#### report
Choices: `'min'`, `'gzip'`
Default: `'min'`
Either report only minification result or report minification and gzip results.
Report minification result or both minification and gzip results.
This is useful to see exactly how well clean-css is performing but using `'gzip'` will make the task take 5-10x longer to complete. [Example output](https://github.com/sindresorhus/maxmin#readme).
### Usage Examples
### Usage

@@ -64,5 +52,5 @@ #### Combine two files into one output file

cssmin: {
combine: {
target: {
files: {
'path/to/output.css': ['path/to/input_one.css', 'path/to/input_two.css']
'output.css': ['foo.css', 'bar.css']
}

@@ -73,25 +61,14 @@ }

#### Add a banner
```js
cssmin: {
add_banner: {
options: {
banner: '/* My minified css file */'
},
files: {
'path/to/output.css': ['path/to/**/*.css']
}
}
}
```
#### Minify all contents of a release directory and add a `.min.css` extension
#### Minify all contents of a release directory and add a `.min.css` extension
```js
cssmin: {
minify: {
expand: true,
cwd: 'release/css/',
src: ['*.css', '!*.min.css'],
dest: 'release/css/',
ext: '.min.css'
target: {
files: [{
expand: true,
cwd: 'release/css',
src: ['*.css', '!*.min.css'],
dest: 'release/css',
ext: '.min.css'
}]
}

@@ -104,2 +81,3 @@ }

* 2014-12-24   v0.11.0   Bump `clean-css` to 3.0.1. Remove `banner` option.
* 2014-06-11   v0.10.0   update clean-css v2.2.0

@@ -127,2 +105,2 @@ * 2014-02-01   v0.9.0   refactor. remove grunt-lib-contrib dependency. backwards-compatibly remove `false` choice from `report`.

*This file was generated on Wed Jun 11 2014 23:05:14.*
*This file was generated on Wed Dec 24 2014 14:59:14.*

@@ -18,3 +18,3 @@ /*

try {
return new CleanCSS(options).minify(source);
return new CleanCSS(options).minify(source).styles;
} catch (err) {

@@ -54,11 +54,7 @@ grunt.log.error(err);

if (options.banner) {
min = options.banner + grunt.util.linefeed + min;
}
grunt.file.write(file.dest, min);
grunt.log.writeln('File ' + chalk.cyan(file.dest) + ' created: ' + maxmin(max, min, options.report === 'gzip'));
grunt.verbose.writeln('File ' + chalk.cyan(file.dest) + ' created: ' + maxmin(max, min, options.report === 'gzip'));
});
});
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc