forked from golden-layout/golden-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (37 loc) · 1.02 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
// Deprecated but left here for now; use the gulp tasks in the Gruntfile.
var gulp = require('gulp');
var concat = require('gulp-concat');
var cConcat = require('gulp-continuous-concat');
var uglify = require('gulp-uglify');
var insert = require('gulp-insert');
var watch = require('gulp-watch');
gulp.task( 'dev', function() {
return gulp
.src([
'./build/ns.js',
'./src/js/utils/utils.js',
'./src/js/utils/EventEmitter.js',
'./src/js/utils/DragListener.js',
'./src/js/**'
])
.pipe(watch('./src/js/**'))
.pipe(cConcat('goldenlayout.js'))
.pipe(insert.wrap('(function($){', '})(window.$);' ))
.pipe(gulp.dest('./dist'));
});
gulp.task( 'build', function() {
return gulp
.src([
'./build/ns.js',
'./src/js/utils/utils.js',
'./src/js/utils/EventEmitter.js',
'./src/js/utils/DragListener.js',
'./src/js/**'
])
.pipe(concat('goldenlayout.js'))
.pipe(insert.wrap('(function($){', '})(window.$);' ))
.pipe(gulp.dest('./dist'))
.pipe(uglify())
.pipe(concat('goldenlayout.min.js'))
.pipe(gulp.dest('./dist'));
});