can't figure how nesting grunt watch and stylus compiler (livereload will come later)
I tried also using the "new" grunt newer, but there must be something wrong in my code.
Any suggestion?
grunt.initConfig({
stylus: {
compile: {
options: {
paths: ['stylus'],
import: [
'nib/*'
]
},
files: {
'css/style.css': 'stylus/style.styl',
},
},
},
watch: {
stylus: {
files: ['*/*.*'],
task: ['newer:stylus:compile'],
options : { livereload: true },
},
},
});
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('compile', ['newer:stylus:all']);
Also, if i run grunt watch
, it works good but do nothing.
And, if i run grunt stylus
, it compile my css perfectly.