咕噜文件
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// This line makes your node configurations available for use
pkg: grunt.file.readJSON('package.json'),
banner:
'/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>;\n' +
' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n */\n',
src: {
js: ['src/**/*.js']
},
// This is where we configure JSHint
jshint: {
myFiles: ['gruntFile.js', '<%= src.js %>'],
options:{
newcap:true,
globals:{}
}
}
});
// Each plugin must be loaded following this pattern
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('default', ['jshint']);
};
为什么当我运行 grunt 我仍然有
调用构造函数时缺少“新”前缀。$scope.paginator = 分页器(2,5,medias);
Paginator 是一个角度服务/工厂/提供者
更新
它应该是:
options:{
newcap:false,
globals:{}
}