我是 grunt 的新手,还在学习,所以我遇到了一个非常奇怪的问题。当我运行"watch"
任务时,我的命令行被阻塞,所以基本上我不能对它做任何事情。请记住,任务已成功完成。这是我的命令行输出:
C:\server\css-test>grunt w
Running "watch" task
Waiting...OK
>> File "compass-examples-master\02\sass\screen.scss" changed.
Running "compass" (compass) task
unchanged compass-examples-master/02/sass/ie.scss
unchanged compass-examples-master/02/sass/print.scss
overwrite compass-examples-master/02/stylesheets/new/sass/screen.css
Running "watch" task
Completed in 1.496s at Fri Mar 22 2013 19:31:37 GMT+0100 (Central Europe Standard Time) - Waiting...
如您所见,我所做的就是运行"compass"
任务,它成功完成。
插入点在Waiting...
文本部分后一直闪烁,但键盘输入不起作用。
我的咕噜声配置
module.exports = function (grunt)
{
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dist: {
options: {
sassDir: 'compass-examples-master/02',
cssDir: 'compass-examples-master/02/stylesheets/new',
imagesDir: 'compas-examples-master/02/images',
boring: false,
outputStyle: 'nested',
require: 'sass-media_query_combiner'
}
}
},
watch: {
files: 'compass-examples-master/02/sass/*',
tasks: ['c']
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.registerTask('c', 'compass');
grunt.registerTask('w', 'watch');
};