forked from fuzzie360/nus-stalker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
29 lines (25 loc) · 841 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 assets = require('./assets');
var _ = require('underscore');
var gulp = require('gulp');
var gutil = require('gulp-util');
var clean = require('gulp-clean');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var cleancss = require('gulp-minify-css');
gulp.task('clean', function () {
return gulp.src('public/build', {read: false})
.pipe(clean())
});
gulp.task('js', function() {
return gulp.src(_.map(assets['/build/script.js'], function(p) { return 'public'+p }))
.pipe(concat('script.js'))
.pipe(uglify())
.pipe(gulp.dest('public/build'))
.on('error', gutil.log)
});
gulp.task('css', function() {
return gulp.src(_.map(assets['/build/style.css'], function(p) { return 'public'+p }))
.pipe(concat('style.css'))
.pipe(cleancss())
.pipe(gulp.dest('public/build'))
});