Grunt Watch And Stylus
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 su
Solution 1:
Well, in your original code you are using the option task
when it should be tasks
(plural). That would be my first guess.
watch: {
stylus: {
files: ['*/*.*'],
tasks: ['stylus:compile'], // This needs to be "tasks" (not "task")
options : { livereload: true },
},
},
I also don't think you need the newer
bit in front.
Solution 2:
I solved by myself, but i can't figure what was the error.
pkg: grunt.file.readJSON('package.json'),
stylus: {
all: {
options: {
paths: ['stylus'],
import: [ // @import'foo', 'bar/moo', etc. into every .styl file
'nib/*'
]
},
files: {
'css/style.css': 'stylus/style.styl', // 1:1compile
},
},
},
watch: {
files: [
'stylus/*.styl',
],
tasks: ['stylus:all'],
}
});
Post a Comment for "Grunt Watch And Stylus"