刚开始接触的呼噜声,而当我运行grunt
我得到这个错误咕噜没有定义
Loading "Gruntfile.js" tasks...ERROR
>> ReferenceError: grunt is not defined
这是我Gruntfile.js
module.exports = function(grunt){
'use strict';
};
刚开始接触的呼噜声,而当我运行grunt
我得到这个错误咕噜没有定义
Loading "Gruntfile.js" tasks...ERROR
>> ReferenceError: grunt is not defined
这是我Gruntfile.js
module.exports = function(grunt){
'use strict';
};
不完全知道为什么,但这个解决那个问题:
'use strict';
module.exports = function(grunt){
};
我也在我的终端上看到了很多“grunt not defined”错误消息。
我从安装了Node和NPM的同一目录中抓取了另一个gruntfile.js,并将其样板gruntfile.js替换为其他gruntfile.js。
现在,我打电话给Grunt,它的工作原理。
我突然发生在我身上,
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
files: {
'style.css': 'style.scss'
},
options: {
includePaths: ['css/'],
outputStyle: 'nested'
}
}
},
});
grunt.loadNpmTasks('grunt-sass');
grunt.registerTask('sass', ['sass']);
};
确保loadNpmTasks和registerTask命令是module.export内,如果他们是封闭咕噜范围之外将不会被定义,所以它失败了
我在我的gruntfile代码中抛出了该错误的尾随逗号。谢谢你ReSharper。希望这可以帮助某人。
pkg: grunt.file.readJSON('package.json'),
ngAnnotate: {
options: {
singleQuotes: true
},
FFApp: {
files: {
'Scripts/Angular-Annotated/Annotated.js': ['Scripts/Angular/**/*js']
}
,(<删除此)
}
,(<而这一次)
},
刚把同样的错误,你,但使用严格的公司我不能解决这个问题。 – Jorre