-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
34 lines (29 loc) · 856 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
var gulp = require('gulp');
var SRC = './src/';
var DIST = './build/';
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var clean = require('gulp-clean');
var rename = require('gulp-rename');
gulp.task('clean', function () {
return gulp.src(DIST + '**/*.js', {read: false})
.pipe(clean());
});
gulp.task('build', ['clean'], function () {
return gulp.src([
SRC + 'map.js',
SRC + 'utility.js',
SRC + 'domUtility.js',
SRC + 'simplean.js'
]).pipe(concat('simplean.js'))
.pipe(gulp.dest(DIST));
});
gulp.task('deploy', ['build'], function () {
return gulp.src(DIST + 'simplean.js')
.pipe(uglify())
.pipe(rename('simplean.min.js'))
.pipe(gulp.dest(DIST));
});
gulp.task('dev', ['build'], function () {
return gulp.watch(SRC + '**/*.js', ['build']);
});