我正在尝试使用Grunt和coffeescript中的所有源代码构建一个项目。首先,我想通过咖啡来运行所有的源。我的Gruntfile.coffee是:
# Gruntfile for base code for Polyglot
module.exports = ->
@initConfig
@loadNpmTasks 'grunt-coffeelint'
coffeelint:
all:["*.coffee"]
@registerTask "default",["coffeelint"]我知道:
咕噜
并得到:
没有找到“咖啡”目标。
我期待着给Gruntfile.coffee做皮棉。
我做错了什么?
发布于 2013-09-05 03:02:22
Gruntfile应该有一个函数,其中包含一个参数:
module.exports = (grunt)->
grunt.initConfig
grunt.loadNpmTasks 'grunt-coffeelint'
coffeelint:
all:["*.coffee"]
grunt.registerTask "default",["coffeelint"]编辑:同样,coffeelint的任务配置应该嵌套在initConfig中,而coffeelint不将all作为其配置的一部分。也许你是说app?:
module.exports = (grunt)->
grunt.initConfig
coffeelint:
app:["*.coffee"]
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.registerTask "default",["coffeelint"]https://stackoverflow.com/questions/18626983
复制相似问题