forked from chandlerprall/GoblinPhysics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (41 loc) · 1.01 KB
/
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
42
43
44
45
var gulp = require( 'gulp' ),
uglify = require('gulp-uglify' ),
concat = require( 'gulp-concat' ),
jshint = require( 'gulp-jshint' );
gulp.task('lint', function(){
gulp.src([
'src/classes/**/*.js'
])
.pipe( jshint() )
.pipe( jshint.reporter( 'default' ) );
});
gulp.task('build', ['lint'], function(){
gulp.src([
'src/intro.js',
'src/classes/Math/**.js',
'src/libglobals.js',
'src/classes/EventEmitter.js',
'src/classes/RigidBody.js',
'src/classes/ForceGenerator.js',
'src/classes/**/*.js',
'src/outro.js'
])
.pipe( concat( 'goblin.js' ) )
.pipe( gulp.dest( 'build' ) );
});
gulp.task('build-minified', ['lint'], function(){
gulp.src([
'src/intro.js',
'src/classes/Math/**.js',
'src/libglobals.js',
'src/classes/EventEmitter.js',
'src/classes/RigidBody.js',
'src/classes/ForceGenerator.js',
'src/classes/**/*.js',
'src/outro.js'
])
.pipe( concat( 'goblin.min.js' ) )
.pipe( uglify() )
.pipe( gulp.dest( 'build' ) );
});
gulp.task('default', ['build', 'build-minified'], function(){});