-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (26 loc) · 906 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' ),
plumber = require( 'gulp-plumber' ),
watch = require( 'gulp-watch' ),
minifycss = require( 'gulp-minify-css' ),
uglify = require( 'gulp-uglify' );
var onError = function( err ) {
console.log( 'An error occurred:', err.message );
this.emit( 'end' );
};
gulp.task( 'css', function() {
return gulp.src( './assets/dev/css/lti_seo_admin.css' )
.pipe( plumber( { errorHandler: onError } ) )
.pipe( minifycss() )
.pipe( gulp.dest( './assets/dist/css/' ) )
} );
gulp.task( 'js', function() {
return gulp.src( './assets/dev/js/lti_seo_admin.js' )
.pipe( uglify() )
.pipe( gulp.dest( './assets/dist/js/' ) )
} );
gulp.task( 'watch', function() {
gulp.watch( './assets/dev/css/*.css', [ 'css' ] );
gulp.watch( './assets/dev/js/*.js', [ 'js' ] );
} );
gulp.task( 'default', ['watch'], function() {
} );