我想将libs目录排除在lint之外.然而,ignores在options种植.jshintignore项目目录文件并不能libs被排除在外.
jshint: {
options: {
smarttabs: true,
ignores: ['public/js/libs/**/*.js']
},
all: [
'Gruntfile.js',
'public/js/**/*.js'
]
},
Run Code Online (Sandbox Code Playgroud)
咕噜版:
grunt-cli v0.1.11
grunt v0.4.2
grunt-contrib-jshint@0.7.2
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我有一个使用RequireJS(2.1.14)作为模块系统的前端SPA .它基本上是bootstrap和加载Backbone.Marionette应用程序.
在main.js:
require.config ({
baseUrl: '/js',
waitSeconds: 200,
nodeRequire: require,
paths: {
jquery: '//cdn/jquery.min',
underscore:'//cdn/underscore-min',
// more plugins
},
shim: {
// shimming stuff
}
});
require(['marionette',
'vent',
'config/template',
'app',
'routers/main'
],
function (Marionette,
vent,
Template,
nrtApp
) {
'use strict';
nrtApp.module ('Public.Main', function (Main, nrtApp, Backbone,Marionette, $, _) {
nrtApp.start ();
// this is where the error is:
requirejs (['config'], function (config) {
if (typeof config !== 'undefined') {config.log ('ok!');}
});
}); …Run Code Online (Sandbox Code Playgroud)