Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
grunt-contrib-cssmin
Advanced tools
Readme
Compress CSS files.
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-contrib-cssmin --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-contrib-cssmin');
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, but in case you can't please use v0.3.2.
Run this task with the grunt cssmin
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Files are compressed with clean-css.
Type: String
Default: null
Prefix the compressed source with the given banner, with a linebreak inbetween.
Type: String
Number
Default: '*'
To keep or remove special comments, exposing the underlying option from clean-css.. '*'
for keeping all (default), 1
for keeping first one, 0
for removing all.
Choices: false
, 'min'
, 'gzip'
Default: false
Either do not report anything, report only minification result, or report 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 ouput using 'gzip'
:
Original: 198444 bytes.
Minified: 101615 bytes.
Gzipped: 20084 bytes.
cssmin: {
combine: {
files: {
'path/to/output.css': ['path/to/input_one.css', 'path/to/input_two.css']
}
}
}
cssmin: {
add_banner: {
options: {
banner: '/* My minified css file */'
},
files: {
'path/to/output.css': ['path/to/**/*.css']
}
}
}
.min.css
extensioncssmin: {
minify: {
expand: true,
cwd: 'release/css/',
src: ['*.css', '!*.min.css'],
dest: 'release/css/',
ext: '.min.css'
}
}
Task submitted by Tim Branyen
This file was generated on Sat Oct 05 2013 19:35:29.
FAQs
Minify CSS
We found that grunt-contrib-cssmin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).