-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
57 lines (48 loc) · 1.07 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.
"use strict";
module.exports = function(grunt) {
var simplebuild = require("./examples/extensions/simplebuild-ext-gruntify.js")(grunt);
grunt.initConfig({
JSHint: {
files: [ "**/*.js", "!node_modules/**/*" ],
options: lintOptions(),
globals: lintGlobals()
},
Mocha: {
files: [ "**/_*_test.js", "!node_modules/**/*" ]
}
});
simplebuild.loadNpmTasks("../tasks/simplebuild-jshint");
simplebuild.loadNpmTasks("../tasks/simplebuild-mocha");
grunt.registerTask("default", "Lint and test", ["JSHint", "Mocha"]);
function lintOptions() {
return {
bitwise: true,
curly: false,
eqeqeq: true,
forin: true,
immed: true,
latedef: false,
newcap: true,
noarg: true,
noempty: true,
nonew: true,
regexp: true,
undef: true,
strict: true,
trailing: true,
node: true
};
}
function lintGlobals() {
return {
// Mocha
describe: false,
it: false,
before: false,
after: false,
beforeEach: false,
afterEach: false,
};
}
};