不确定我是否做得对...
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json') ,
connect: {
server: {
options: {
port: 8001 ,
hostname: 'localhost' ,
base: 'www-root/app/public' ,
keepalive: true
}
}
} ,
jade: {
files: {
src: 'app/components/jade/index.jade' ,
dest: 'app/public/index.html'
}
} ,
compass: {
options: {
config: 'config.rb'
}
} ,
watch: {
css: {
files: '**/*.sass' ,
tasks: ['sass'] ,
options: {
livereload: true
}
} ,
jade: {
files: 'app/components/**/*.jade' ,
tasks: ['jade'] ,
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['connect', 'jade', 'compass', 'watch']);
}
每次我运行 grunt 时,它只向我显示连接任务,并且没有其他任何事情发生,例如当我更改我的 index.jade 文件时......这是我按顺序组织任务的方式有问题还是我应该添加一些运行的东西任务异步?
不知道该怎么做..谢谢!