-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
47 lines (42 loc) · 1.23 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
39
40
41
42
43
44
45
46
47
var gulp = require('gulp'),
path = require('path'),
coffee = require('gulp-coffee'),
less = require('gulp-less'),
concat = require('gulp-concat');
// Watch for changes
gulp.task('watch', function(){
gulp.watch(['./coffee/*.coffee'], ['coffee']);
gulp.watch(['./less/*.less'], ['less']);
gulp.watch(['./less/*/*.less'], ['less']);
});
// Compile CoffeeScript
gulp.task('coffee', function(){
gulp.src('./coffee/*.coffee')
.pipe(coffee())
.pipe(gulp.dest('../assets/js'));
});
// Compile Less
gulp.task('less', function(){
var lessConfig = {
compress: true,
paths: [ path.join('bower') ]
};
gulp.src([
'./less/traq.less'
// './less/chosen.less',
// './less/glyphicons.less'
])
.pipe(less(lessConfig))
.pipe(gulp.dest('../assets/css'));
});
gulp.task('js', function() {
gulp.src([
// './bower/jquery/dist/jquery.min.js',
'./bower/jquery-cookie/jquery.cookie.js',
'./bower/bootstrap/dist/js/bootstrap.min.js',
'./bower/chosen/chosen.jquery.min.js',
'./bower/moment/min/moment-with-locales.min.js'
])
.pipe(concat('js.js'))
.pipe(gulp.dest('../assets/js'));
});