Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to output compiled CSS files to a different production folder using grunt and grunt-contrib-less
    primarykey
    data
    text
    <p>I've found this solution to building less using the grunt-contrib-less package, but I can't figure out using grunts configuration tasks (<a href="http://gruntjs.com/configuring-tasks" rel="nofollow">http://gruntjs.com/configuring-tasks</a>) how to output the *.css files to a specific destination. I tried dest: "C:/my_folder/". Any suggestions?</p> <pre><code>less: { options: { paths: ['css/base'] }, // target name src: { // no need for files, the config below should work expand: true, cwd: "css/base", src: "*.less", ext: ".css" } } </code></pre> <p>I've also tried using the example from grunt-contrib-less but I can't figure out how to get it to a) just choose all the files and build them into the same file name with a different extension (ie. .less to .css) like it does above b) I don't understand the options JSON attribute (even reading the docs)</p> <pre><code>less: { development: { options: { paths: ["assets/css"] }, files: { "dev/css/*.css": "dev/less/*.less" } }, production: { options: { paths: ["assets/css"], cleancss: true }, files: { "prod/css/*.css": "dev/less/*.less" } } } </code></pre> <p>At the end of all this I'd really like to have a combination of both of these that took all my less and compiles it to css for development and finally css for production which is minified.</p> <p>I've thumbed through <a href="http://net.tutsplus.com/tutorials/javascript-ajax/meeting-grunt-the-build-tool-for-javascript/" rel="nofollow">http://net.tutsplus.com/tutorials/javascript-ajax/meeting-grunt-the-build-tool-for-javascript/</a> and <a href="http://www.integralist.co.uk/Grunt-Boilerplate.html" rel="nofollow">http://www.integralist.co.uk/Grunt-Boilerplate.html</a> without much luck understanding Grunt.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload