I've set up a project with grunt watch (for coffee and scss files essentially). I've got a infinite loop issue.
here is my Gruntfile.js file:
'use strict'; module.exports = function(grunt) { require('load-grunt-tasks')(grunt); grunt.initConfig({ coffeelint: { dist: ['coffee/*.coffee'], server: ['coffee/*.coffee'] }, coffee: { dist: { compile: { files: { 'js/hscroll.js': 'coffee/*.coffee' } } }, server: { compileWithMaps: { options: { bare: true, sourceMap: true }, files: { 'js/hscroll.js': 'coffee/*.coffee', } } } }, uglify: { dist: { files: { 'js/hscroll.min.js': ['js/hscroll.js'] } } }, watch: { coffee: { files: ['coffee/*.coffee'], tasks: ['coffeelint:server', 'coffee:server'] }, compass: { files: ['sass/{,*/}*.{scss,sass}'], tasks: ['compass:server'] } }, compass: { dist: { options: { sassDir: 'sass', cssDir: 'stylesheets', } }, server: { options: { debugInfo: true, sassDir: '/sass', cssDir: '.tmp', relativeAssets: false, assetCacheBuster: false } } }, clean: { dist: { files: [{ dot: true, src: '.tmp' }] }, server: '.tmp' }, }); grunt.registerTask('dist', ['clean:dist', 'coffeelint:dist', 'coffee:dist', 'compass:dist', 'uglify:dist']); grunt.registerTask('watch', [ 'clean:server', 'coffeelint:server', 'coffee:server', 'compass:server', 'watch' ]); };
It loops when I launch 'grunt watch', I don't unserstand why?
Perhaps a newbie questions, but any help will be welcome....
Thanks.
My folder structure is: hscroll> css .sass.cache (I used compass) coffee css sass stylesheets
grunt dist works perfectly.
Thanks.