I have a working Gruntfile with less and autoprefixer. I also have a grunt watch that works great.
Before I used autoprefixer, I used fewer mixins for provider prefixes. Running "grunt less" will create working CSS with all my prefixes.
Now I have autoprefixer, but if I want to make a one-time assembly of my styles, now I need to run "grunt less" and then "grunt autoprefixer" to get working CSS with prefixes.
How can I change "grunt less" so that it does not work, and prefixes are less common?
I have read the docs and I know that I could add an extra task to complete these two actions . But:
- 'grunt less' now has no useful information. The challenge should always provide useful performance.
- I donโt want to tell other people that "grunt less" does not lead to a useful release
- No additional task required to replace one that does not work
Ie, I just want to grunt less to create working CSS (with prefixes) .
module.exports = function(grunt) { // Load Grunt tasks declared in the package.json file require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); // Configure Grunt grunt.initConfig({ less: { development: { options: { paths: ["./less"], yuicompress: false }, files: { "./public/css/style.css": "./public/less/style.less" } } }, autoprefixer: { development: { browsers: ['last 2 version', 'ie 9'], expand: true, flatten: true, src: 'public/css/*.css', dest: 'public/css' } }, watch: { less: { files: ["./public/less/*"], tasks: ["less", "autoprefixer:development"], options: { livereload: true } } }, }); };
source share