forked from michaelowens/vue-selectize
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
24 lines (22 loc) · 722 Bytes
/
gulpfile.js
File metadata and controls
24 lines (22 loc) · 722 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
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
rename = require('gulp-rename'),
pkg = require('./package.json'),
del = require('del'),
fs = require('fs'),
bannerTemplate = fs.readFileSync('banner.tmpl', 'utf8');
gulp.task('clean', function () {
return del(['dist']);
});
gulp.task('default', ['clean'], function () {
return gulp.src('src/*.js')
.pipe(header(bannerTemplate, { pkg : pkg } ))
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(header(bannerTemplate, { pkg : pkg } ))
.pipe(rename(function (path) {
path.extname = '.min.js';
}))
.pipe(gulp.dest('dist'));
});