]>
Commit | Line | Data |
---|---|---|
1 | 'use strict'; | |
2 | ||
3 | const Gulp = require('gulp'); | |
4 | const Babel = require('gulp-babel'); | |
5 | const Concat = require('gulp-concat'); | |
6 | const Rename = require('gulp-rename'); | |
7 | const Uglify = require('gulp-uglify'); | |
8 | ||
9 | Gulp.task('build', function() { | |
10 | Gulp.src([ | |
11 | 'lib/serpentity.js', | |
12 | 'lib/serpentity/entity.js', | |
13 | 'lib/serpentity/node.js', | |
14 | 'lib/serpentity/node_collection.js', | |
15 | 'lib/serpentity/component.js', | |
16 | 'lib/serpentity/system.js' | |
17 | ]) | |
18 | .pipe(Babel({ | |
19 | presets: ['es2015'] | |
20 | })) | |
21 | .pipe(Concat('serpentity.js')) | |
22 | .pipe(Gulp.dest('dist')) | |
23 | .pipe(Uglify()) | |
24 | .pipe(Rename({ | |
25 | suffix: '.min' | |
26 | })) | |
27 | .pipe(Gulp.dest('dist')); | |
28 | }); |