-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
54 lines (47 loc) · 1.37 KB
/
gulpfile.coffee
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
48
49
50
51
52
53
54
gulp = require 'gulp'
less = require 'gulp-less'
coffee = require 'gulp-coffee'
concat = require 'gulp-concat'
uglify = require 'gulp-uglify'
combiner = require 'stream-combiner2'
paths =
less: './public/less/**/*.less'
css: './public/css'
components: './public/bower_components'
coffee: './public/coffee/**/*.coffee'
js: './public/js'
gulp.task 'less', ->
combiner [
gulp.src(paths.less)
less
paths: [__dirname + '/public/bower_components/bootstrap/less']
gulp.dest(paths.css)
]
gulp.task 'components', ->
components = [
'jquery/dist/jquery.js'
'bootstrap/dist/js/bootstrap.js'
'highcharts-release/highcharts.js'
'angular/angular.js'
'angular-local-storage/dist/angular-local-storage.js'
'lodash/dist/lodash.js'
'ladda/js/spin.js'
'ladda/js/ladda.js'
'angular-ladda/dist/angular-ladda.js'
'moment/moment.js'
'moment-range/lib/moment-range.js'
'bootstrap-daterangepicker/daterangepicker.js'
]
gulp.src(components.map (p) -> paths.components + '/' + p)
.pipe concat('components.js')
# .pipe uglify()
.pipe gulp.dest(paths.js)
gulp.task 'coffee', ->
gulp.src(paths.coffee)
.pipe coffee()
.pipe gulp.dest(paths.js)
gulp.task 'watch', ->
gulp.watch(paths.less, ['less'])
gulp.watch(paths.coffee, ['coffee'])
gulp.task 'build', ['less', 'components', 'coffee']
gulp.task 'default', ['build']