-
Notifications
You must be signed in to change notification settings - Fork 5
/
gulpfile.coffee
47 lines (38 loc) · 1011 Bytes
/
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
gulp = require 'gulp'
util = require 'gulp-util'
coffee = require 'gulp-coffee'
sass = require 'gulp-sass'
tictail = require 'gulp-tictail'
plumber = require 'gulp-plumber'
livereload = require 'gulp-livereload'
src =
scripts: 'src/scripts/*.coffee'
styles: 'src/styles/*.scss'
theme: 'src/*.mustache'
dest = 'dist'
errorHandler = (error) ->
util.log error
@emit 'end'
gulp.task 'styles', ->
gulp.src src.styles
.pipe plumber errorHandler
.pipe sass()
.pipe gulp.dest dest
.pipe livereload()
gulp.task 'scripts', ->
gulp.src src.scripts
.pipe plumber errorHandler: errorHandler
.pipe coffee()
.pipe gulp.dest dest
.pipe livereload()
gulp.task 'theme', ->
gulp.src src.theme
.pipe livereload()
gulp.task 'watch', ->
gulp.watch src.styles, ['styles']
gulp.watch src.scripts, ['scripts']
gulp.watch src.theme, ['theme']
gulp.task 'serve', ->
tictail.serve store_id: 't'
livereload.listen basePath: dest
gulp.task 'default', ['watch', 'serve']