Awesome
DEPRECATED. Use grunt-postcss instead.
grunt-cssnext
Use tomorrow's CSS syntax, today. Via Grunt
Issues with the output should be reported on cssnext issue tracker.
Install
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile.js
as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
$ npm install --save-dev grunt-cssnext
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks("grunt-cssnext")
Usage
grunt.initConfig({
cssnext: {
options: {
sourcemap: true
},
dist: {
files: {
"dist/index.css": "src/index.css"
}
}
}
})
grunt.loadNpmTasks("grunt-cssnext")
grunt.registerTask("default", ["cssnext"])
Options
Options are directly passed to cssnext, so checkout cssnext options directly
Note: from
& to
options are automatically specified using grunt source & dest.