This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
66 lines (55 loc) · 1.6 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
58
59
60
61
62
63
64
65
66
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
clean: ["clients/browser/*.min.js", "test/dependencies/*.browser.js"],
jshint: {
options: {
laxbreak: true
},
files: [
"Gruntfile.js",
"clients/**/*.js",
"test/server/**/*.js",
"test/browser/**/*.js",
"test/mocks/*.js"
]
},
uglify: {
release: {
files: {
"clients/browser/tokensockjs.min.js": [
"clients/browser/tokensockjs.js",
"node_modules/wolfy87-eventemitter/EventEmitter.js"
]
}
}
},
browserify: {
"test/dependencies/server.browser.js": [
"test/mocks/server.client.js"
]
},
mochaTest: {
options: { reporter: "spec", checkLeaks: true },
src: ["test/server/index.js"]
},
mocha_phantomjs: {
all: [
"test/browser/unit.html",
"test/browser/integration.html"
]
}
});
grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks("grunt-mocha-phantomjs");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.registerTask("test", ["mochaTest", "mocha_phantomjs"]);
grunt.registerTask("lint", ["jshint"]);
grunt.registerTask("compress", ["uglify"]);
grunt.registerTask("debug", ["clean", "lint", "browserify", "test"]);
grunt.registerTask("release", ["debug", "compress"]);
grunt.registerTask("default", ["release"]);
};