forked from beenote/angular-material-datetimepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (34 loc) · 889 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
33
34
35
36
37
38
39
/*jshint esversion: 6 */
const gulp = require('gulp');
const pump = require('pump');
const uglify = require('gulp-uglify');
const cleanCSS = require('gulp-clean-css');
const sourcemaps = require('gulp-sourcemaps');
const rename = require('gulp-rename');
const exec = require('child_process').exec;
gulp.task('js', cb => {
pump([
gulp.src(['./js/angular-material-datetimepicker.js']),
sourcemaps.init(),
uglify(),
rename({extname: '.min.js'}),
sourcemaps.write(''),
gulp.dest('./dist/')
], cb);
});
gulp.task('css', cb => {
pump([
gulp.src(['./css/material-datetimepicker.css']),
cleanCSS(),
rename({extname: '.min.css'}),
gulp.dest('./dist/')
], cb);
});
gulp.task('default', gulp.parallel('js', 'css'));
gulp.task('serve', function (cb) {
exec('npm run dev', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});