forked from wenzhixin/bootstrap-show-password
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
30 lines (26 loc) · 776 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
var fs = require('fs'),
gulp = require('gulp'),
del = require('del'),
header = require('gulp-header'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
pkg = require('./package.json'),
banner;
banner = [
'/**',
' * @author <%= pkg.author %>',
' * https://github.com/wenzhixin/bootstrap-show-password',
' * version: <%= pkg.version %>',
' */',
''].join('\n');
gulp.task('clean', function(cb) {
del(['./bootstrap-show-password.min.js'], cb);
});
gulp.task('js', ['clean'], function () {
gulp.src('bootstrap-show-password.js')
.pipe(rename({suffix: '.min'}))
.pipe(uglify())
.pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest('.'));
});
gulp.task('default', ['js']);