-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
40 lines (34 loc) · 1008 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
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var coffee = require('gulp-coffee');
var paths = {
sass: ['./www/**/*.scss'],
coffee: ['./www/**/*.coffee']
};
gulp.task('default', ['sass']);
gulp.task('sass', function(done) {
gulp.src('./www/sass/**.scss')
.pipe(sass({ errLogToConsole: true}))
.pipe(rename({ extname: '.css' }))
.pipe(concat('style.css'))
.pipe(gulp.dest('./www/css'))
.on('end', done);
});
gulp.task('coffee', function(done) {
gulp.src(paths.coffee)
.pipe(coffee({bare: true})
.on('error', gutil.log.bind(gutil, 'Coffee Error')))
.pipe(concat('application.js'))
.pipe(gulp.dest('./www/js'))
.on('end', done)
})
gulp.task('watch', function() {
gulp.watch(paths.sass, ['sass'])
gulp.watch(paths.coffee, ['coffee'])
});