我在以下 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 中是否有任何不合适的地方?
在此先感谢,
丹