-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
37 lines (32 loc) · 967 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
var gulp = require('gulp');
var jade = require('gulp-jade');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var sass = require('gulp-ruby-sass');
gulp.task('sass', function() {
return sass('./src/assets/scss/app.scss', {
style: 'compressed',
compass: true
})
.on('error', sass.logError)
.pipe(gulp.dest('./public/assets/css'));
});
gulp.task('template', function() {
return gulp.src('./src/jade/public/**/*.jade')
.pipe(jade({
pretty: false
}))
.pipe(gulp.dest('./public/'))
});
gulp.task('scripts', function() {
return gulp.src('./src/assets/js/**/*.js')
.pipe(concat('app.js'))
.pipe(uglify())
.pipe(gulp.dest('./public/assets/js'));
});
gulp.task('watch', function() {
gulp.watch('./src/assets/scss/**/*', ['sass']);
gulp.watch('./src/assets/js/**/*', ['scripts'])
gulp.watch('./src/jade/public/**/*', ['template']);
});
gulp.task('default', ['sass', 'scripts', 'template']);