-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgruntfile.js
More file actions
39 lines (37 loc) · 1.03 KB
/
gruntfile.js
File metadata and controls
39 lines (37 loc) · 1.03 KB
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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
browserify: {
buildApp: {
options: {
transform: [
[require('grunt-react').browserify, {global: true}],
["babelify", {loose:'all'}]
]
},
src: [ 'client/app.js'],
dest: 'server/public/app.js'
},
buildLobby: {
options: {
transform: [
[require('grunt-react').browserify, {global: true}],
["babelify", {loose:'all'}]
]
},
src: [ 'client/lobby.js', 'client/actions/lobby-actions.js'],
dest: 'server/public/lobby.js'
}
},
watch: {
scripts: {
files: 'client/**/*.js',
tasks: ['browserify:buildApp'],
//tasks: ['browserify:buildLobby'],
},
},
})
grunt.registerTask('build', ['browserify:buildApp', 'browserify:buildLobby']);
grunt.registerTask('w', 'watch');
}