grunt-cssnext
Use tomorrow's CSS syntax, today. Via Grunt
Issues with the output should be reported on cssnext issue tracker.
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")
grunt.initConfig({
cssnext: {
options: {
sourcemap: true
},
dist: {
files: {
"dist/index.css": "src/index.css"
}
}
}
})
grunt.loadNpmTasks("grunt-cssnext")
grunt.registerTask("default", ["cssnext"])
Options are directly passed to cssnext, so checkout cssnext options directly
Note: from
& to
options are automatically specified using grunt source & dest.