【发布时间】:2013-03-25 01:30:48
【问题描述】:
我在以下 gruntfile 中使用 grunt-vows (https://github.com/CMTegner/grunt-vows):
module.exports = function(grunt) {
// Project configuration.
grunt.loadNpmTasks("grunt-vows");
grunt.initConfig({
vows: {
all: {
options: {
reporter: "spec",
verbose: true,
silent: false,
colors: true,
isolate: false,
coverage: "json"
},
src: ["test/*.js"]
}
}
});
// Default task.
grunt.registerTask('default', 'vows');
};
运行grunt时出现以下错误:TypeError: Object #<Object> has no method 'options'at Object.<anonymous> (/home/dan/playlist/node_modules/grunt-vows/tasks/vows.js:32:33)at Object.<anonymous> (/usr/lib/node_modules/grunt/lib/grunt/task.js:109:15)at Object.thisTask.fn (/usr/lib/node_modules/grunt/lib/grunt/task.js:58:16)
我确信我在某个地方犯了一个简单的错误,在 gruntfile 中是否有什么不合适的地方?
提前致谢,
丹
【问题讨论】: