forked from anthony7mendoza/bwch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
56 lines (56 loc) · 1.54 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
module.exports = function(grunt) {
'use strict';
require("load-grunt-tasks")(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
all: {
files: [
'Gruntfile.js',
'src/bwch.js',
'example/js/src/test-bw.js'
],
tasks: ['shell:jshint']
}
},
shell: {
jshint: {
command: 'jshint src/. Gruntfile.js example/js/src/. test/spec/src/.'
},
browserify: {
command: 'browserify example/js/src/test-bw.js -o example/js/dist/test-bw.js -t [ babelify --presets [ es2015 ] ] -v'
},
browserifyTest: {
command: 'browserify test/spec/src/bwch.spec.js -o test/spec/dist/bwch.spec.js -t [ babelify --presets [ es2015 ] ] -v'
},
watchify: {
command: 'watchify example/js/src/test-bw.js -o example/js/dist/test-bw.js -t [ babelify --presets [ es2015 ] ] -v'
},
watchifyTest: {
command: 'watchify test/spec/src/bwch.spec.js -o test/spec/dist/bwch.spec.js -t [ babelify --presets [ es2015 ] ] -v'
}
},
concurrent: {
prod: {
tasks: ['shell:browserify', 'shell:browserifyTest'],
options: {
logConcurrentOutput: true
}
},
dev: {
tasks: ['shell:watchify', 'shell:watchifyTest'],
options: {
logConcurrentOutput: true
}
}
}
});
// Default task(s).
grunt.registerTask('dev', [
'concurrent:dev'
]);
grunt.registerTask('default', [
'shell:jshint',
'concurrent:prod'
]);
};