-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (33 loc) · 1.09 KB
/
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
var gulp = require('gulp');
var inject = require('gulp-inject');
var debug = require('gulp-debug');
var concat = require('gulp-concat');
var livereload = require('gulp-livereload');
var coffeeify = require('gulp-coffeeify');
var COFFEE_STATIC_PATH = './static/coffee/*.coffee';
var STYLES_STATIC_PATH = [
'./bower_components/bootstrap/dist/css/bootstrap.min.css',
'./static/css/style.css'
];
var PUBLIC_JS_STATIC_PATH = './public/js/';
var PUBLIC_CSS_STATIC_PATH = './public/css/';
gulp.task('scripts', function() {
return gulp.src(COFFEE_STATIC_PATH)
.pipe(debug({title: 'coffee:'}))
.pipe(coffeeify())
.pipe(concat('all.js'))
.pipe(gulp.dest(PUBLIC_JS_STATIC_PATH))
.pipe(livereload());
});
gulp.task('styles', function() {
gulp.src(STYLES_STATIC_PATH)
.pipe(debug({title: 'styles:'}))
.pipe(concat('style.css'))
.pipe(gulp.dest(PUBLIC_CSS_STATIC_PATH));
});
gulp.task('watch', function() {
livereload.listen(35729);
gulp.watch(COFFEE_STATIC_PATH, ['scripts']);
gulp.watch(STYLES_STATIC_PATH, ['styles']);
});
gulp.task('default', ['scripts', 'styles', 'watch']);