-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
34 lines (30 loc) · 883 Bytes
/
gulpfile.js
File metadata and controls
34 lines (30 loc) · 883 Bytes
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
var gulp = require('gulp');
var watch = require('gulp-watch');
var pug = require('gulp-pug');
var less = require('gulp-less');
var minifyCSS = require('gulp-css');
var uglify = require('gulp-uglify');
var minifyjs = require('gulp-js-minify');
/*
gulp.task('html', function(){
return gulp.src('client/templates/*.pug')
.pipe(pug())
.pipe(gulp.dest('static/build/html'))
});*/
gulp.task('css', function(){
return gulp.src('static/less/*.less')
.pipe(less())/*
.pipe(minifyCSS())*/
.pipe(gulp.dest('static/build/css'))
});
gulp.task('script', function() {
gulp.src('static/scripts/*.js')
.pipe(uglify())
.pipe(minifyjs())
.pipe(gulp.dest('static/build/js'))
});
gulp.task('watch', function() {
gulp.watch('static/less/*.less', ['css']);
gulp.watch('static/scripts/*.js', ['script']);
});
gulp.task('default', ['watch', 'css', 'script' ]);