This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.coffee
68 lines (60 loc) · 1.58 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
gulp = require 'gulp'
coffee = require 'gulp-coffee'
concat = require 'gulp-concat'
browserSync = require('browser-sync').create()
templateCache = require 'gulp-angular-templatecache'
streamqueue = require 'streamqueue'
conf =
dependencies_css: [
'node_modules/bootswatch/dist/sandstone/bootstrap.min.css'
]
dependencies_js: [
'node_modules/js-nacl/lib/nacl_factory.js'
'node_modules/theglow/dist/theglow.min.js'
'node_modules/angular/angular.min.js'
]
templates: ['src/**/*.html']
css: ['src/**/*.css']
coffee: ['src/**/*.coffee']
build: 'build/'
dist: './'
watch: ['src/**/*.coffee', 'src/**/*.css', '**/*.html']
gulp.task 'css', ->
streamqueue objectMode: true,
gulp.src conf.dependencies_css
gulp.src conf.css
.pipe concat 'app.css'
.pipe gulp.dest conf.dist
gulp.task 'js', ->
streamqueue objectMode: true,
gulp.src conf.dependencies_js
gulp.src conf.coffee
.pipe coffee()
gulp.src conf.templates
.pipe templateCache(
module: 'app'
root: 'src/'
)
.pipe concat 'app.js'
.pipe gulp.dest conf.dist
gulp.task 'dist', ['css', 'js']
gulp.task 'build', ->
gulp.src conf.css
.pipe gulp.dest conf.build
gulp.src conf.coffee
.pipe coffee()
.pipe concat 'app.js'
.pipe gulp.dest conf.build
gulp.task 'default', ['build'], ->
browserSync.init
server:
baseDir: './'
index: 'index-dev.html'
notify: false
online: true
minify: false
ghostMode: false
reloadOnRestart: true
gulp.watch conf.watch, ['watch']
gulp.task 'watch', ['build'], ->
browserSync.reload()