forked from allenhwkim/angularjs-autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (30 loc) · 948 Bytes
/
gulpfile.js
File metadata and controls
33 lines (30 loc) · 948 Bytes
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
'use strict';
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var stripDebug = require('gulp-strip-debug');
var clean = require('gulp-clean');
var runSequence = require('run-sequence');
gulp.task('clean', function() {
return gulp.src('bulid')
.pipe(clean({force: true}));
});
gulp.task('build-js', function() {
return gulp.src([
'directives/auto-complete.js',
'directives/auto-complete-multi.js',
'directives/auto-complete-div.js',
'services/*.js'])
.pipe(concat('angularjs-autocomplete.debug.js'))
.pipe(gulp.dest('build'))
.pipe(stripDebug())
.pipe(concat('angularjs-autocomplete.js'))
.pipe(gulp.dest('build'))
.pipe(uglify())
.pipe(rename('angularjs-autocomplete.min.js'))
.pipe(gulp.dest('build'));
});
gulp.task('build', function(callback) {
runSequence('clean', 'build-js', callback);
});