forked from OSAMES/ionic-Select-Control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
29 lines (26 loc) · 828 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
var gulp = require('gulp');
var cssnano = require('gulp-cssnano');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
gulp.task('default', ['minify-javascript', 'minify-css']);
gulp.task('minify-javascript', function (done) {
gulp.src('./src/*.js')
.pipe(sourcemaps.init())
.pipe(uglify(),
{
mangle: false,
output: { beautify: true }
})
.pipe(rename({ extname: '.min.js' }))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist/'))
.on('end', done);
});
gulp.task('minify-css', function (done) {
gulp.src('./src/*.css')
.pipe(cssnano())
.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./dist/'))
.on('end', done);
});