This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
forked from JWally/jsLPSolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
executable file
·48 lines (46 loc) · 1.56 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
module.exports = function(grunt){
grunt.initConfig({
"pkg": "package.json",
"jshint": {
"files": ["src/**/*.js","test/**/*.js","!src/solver.js"],
"options": {
"curly": true,
"eqeqeq": true,
"latedef": true,
"indent": 4,
"noempty": true,
"quotmark": "double",
"undef": true,
"globals": {"define": true, "window" :true}
}
},
"mochaTest": {
"test": {
"options": {
"reporter": "json",
"quite": "true",
"captureFile": "test_results.txt"
},
"src": ["test/*.js"]
}
},
"browserify": {
"dist": {
"files": {
"src/solver.js": ["./src/main.js"]
},
"options": {
"banner": "(function(){if (typeof exports === \"object\") {module.exports = require(\"./main\");}})();"
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks("grunt-browserify");
grunt.registerTask("default", ["jshint"]);
grunt.registerTask("test", ["jshint","mochaTest"]);
grunt.registerTask("speed", function(){require("./benchmark/bench.test_suite");});
grunt.registerTask("prod", ["jshint","mochaTest","browserify"]);
}