forked from bikedeboa/bikedeboa-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
executable file
·41 lines (36 loc) · 956 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
40
41
var gulp = require('gulp'),
concat = require('gulp-concat'),
minifycss = require('gulp-minify-css'),
uglify = require('gulp-uglify');
var css = {
source: 'src/stylesheets',
target: 'public/stylesheets'
};
var js = {
source: 'src/javascripts',
target: 'public/javascripts'
};
gulp.task('css', function () {
gulp.src([
css.source + '/normaset.css',
css.source + '/*.css'
])
.pipe(concat('all.min.css'))
.pipe(minifycss({keepSpecialComments: false}))
.pipe(gulp.dest(css.target));
});
gulp.task('js', function() {
gulp.src([
js.source + '/vendor/*.js',
js.source + '/*.js'
])
.pipe(concat('all.min.js'))
.pipe(uglify({mangle: true}).on('error', console.error))
.pipe(gulp.dest(js.target));
});
gulp.task('watch', function() {
livereload.listen();
gulp.watch(css.source + '/*.css', ['css']);
gulp.watch(js.source + '/*.js', ['js']);
});
gulp.task('default', ['css', 'js']);