-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
61 lines (58 loc) · 1.29 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
// npm-installed modules
var loadGruntTasks = require('load-grunt-tasks');
exports = module.exports = (grunt) => {
loadGruntTasks(grunt);
grunt.initConfig({
browserify: {
dist: {
files: {
'web/js/engine.js': 'engine/math.js',
},
options: {
exclude: [
'engine/clients.js',
'engine/index.js',
'engine/networks.js',
'engine/pages.js',
'common-errors',
],
transform: [
['babelify', { presets: ['es2015'] }],
['uglifyify', { global: true }],
],
},
},
},
eslint: {
src: [
'app.js',
'config/**/*.js',
'engine/**/*.js',
'Gruntfile.js',
'routes/**/*.js',
'web/js/*.js',
'!web/js/engine.js',
'test/**/*.js',
],
},
mochaTest: {
test: [
'test/test.*.js',
],
},
sass: {
dist: {
files: [{
expand: true,
cwd: 'web/_sass/',
src: ['*.sass'],
dest: 'web/css/',
ext: '.css',
}],
},
},
});
grunt.registerTask('build', ['browserify', 'sass']);
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('test', ['lint', 'mochaTest']);
};