node.js - How to setup Gruntfile.js to watch for SASS (compass) and JS -


I'm new to using gruntjs and nodejs. I wanted to know how to set up a grunfile so that She compiles both sausage files and JS files using the clock.

This is what I've done so far:

  Module Exports = function (wok) {"strict experiment"; Required ("matchdep") filterDev ("grunting - *") foreach (grunt.loadNpmTasks) .. Grunt.initConfig ({pkg: grunt.file.readJSON ('package.json'), compass: {dist: {options: {config: 'config.rb', clock: true}}}}}); Grunt.registerTask ('default', []); };  

Any help would be greatly appreciated thanks!

Try it with them, they are both grunt plugins specifically for this type of thing:

  sass: {dist: {options: {style: 'compressed'}, files: {'css / build / global.css':' ['SAS'], option: {spawn: false }}},  

The above Watch Plugin configuration will look for changes in any .scss files, and sass will be assigned to the task (Also defined above). You can also hook into livereload in this way, you can also have multiple clocks (just defines the CSS clock above); Create a second clock to reduce JS

I have an example that you can see that it also connects JavaScript and does some mining with hoarse-vomiting. .


Comments