【发布时间】:2014-02-07 19:30:27
【问题描述】:
我在 Windows 8 上安装 grunt。我的 gruntfile.js 非常简单:
module.exports = function(grunt) {
stylus: {
files: {
'build/style.css': ['styles/style.styl'],
}
};
autoprefixer: {
// prefix the specified file
single_file: {
options: {
// Target-specific options go here.
}
src: 'build/style.css';
dest: 'build/styles.css';
};
};
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.registerTask('default', ['stylus']);
grunt.registerTask('stylus', ['stylus']);
grunt.registerTask('ap', ['autoprefixer']);
};
我在咕噜咕噜地跑,得到错误:
X:\PROJEKTS\MY\test\Gruntfile.js:5 'build/style.css': ['styles/style.styl'] ^ 正在加载“Gruntfile.js”任务...错误
SyntaxError: Unexpected token : Warning: Task "default" not found.使用 --force 继续。
由于警告而中止。
请帮帮我
【问题讨论】: