forked from Cinamonas/jquery-drilldown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
32 lines (27 loc) · 851 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
var gulp = require('gulp');
var gutil = require('gulp-util');
var rename = require('gulp-rename');
var replace = require('gulp-replace');
var bump = require('gulp-bump');
var uglify = require('gulp-uglify');
var pkg = require('./package.json');
var NAME = 'jquery.drilldown';
gulp.task('bump', function () {
return gulp.src(['package.json', 'bower.json'])
.pipe(bump({ type: gutil.env.type }))
.pipe(gulp.dest('.'));
});
gulp.task('dist:orig', function () {
return gulp.src('index.js')
.pipe(replace('$VERSION$', pkg.version))
.pipe(rename(NAME + '.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('dist', ['dist:orig'], function () {
return gulp.src('dist/' + NAME + '.js')
.pipe(uglify({
preserveComments: 'some'
}))
.pipe(rename(NAME + '.min.js'))
.pipe(gulp.dest('dist'));
});