-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
41 lines (36 loc) · 1011 Bytes
/
gulpfile.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
//All dependencies loaded
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var react = require('gulp-react');
//Folder paths
var jsBuildPath = 'js/dist';
//Javascript files list
var javascriptFiles = [
'node_modules/react/dist/react.js',
'node_modules/socket.io-client/socket.io.js',
'js/src/main.js',
'js/src/modules/BingoItem.js',
'js/src/modules/BingoCard.js',
'js/src/modules/WaitRound.js',
'js/src/modules/EndGame.js'
];
/**
* Build for production, without sourcemaps and uglified
* Runs clean before running this
*/
gulp.task('build-js', function ()
{
return gulp.src(javascriptFiles)
.pipe(react())
.pipe(concat('final.js'))
.pipe(gulp.dest(jsBuildPath));
});
/**
* Default watcher for development. Cleans build folder before and does a build before starting watching
*/
gulp.task('default', function ()
{
gulp.start('build-js');
gulp.watch(javascriptFiles, ['build-js']);
});