forked from hackfoldr/hackfoldr-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.ls
44 lines (34 loc) · 1.31 KB
/
gulpfile.ls
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
require! <[gulp gulp-util express connect-livereload gulp-livereload path gulp-compass gulp-jade]>
app = express!
build_path = '_public'
gulp.task 'sass', ->
gulp.src 'sass/*.sass'
.pipe gulp-compass {sass: 'sass', css: "#{build_path}/css", sourcemap: 'ture'}
.pipe gulp.dest "#{build_path}/css"
gulp.task 'jade', ->
gulp.src '*.jade'
.pipe gulp-jade!
.pipe gulp.dest "#{build_path}"
gulp.task 'html', ->
gulp.src '*.html'
.pipe gulp.dest "#{build_path}"
gulp.task 'assets', ->
gulp.src 'assets/**/*'
.pipe gulp.dest "#{build_path}/assets"
gulp.task 'js', ->
gulp.src 'js/*.js'
.pipe gulp.dest "#{build_path}/js"
gulp.task 'server', ->
app.use connect-livereload!
app.use express.static path.resolve "#{build_path}"
app.listen 3000
gulp-util.log 'listening on port 3000'
gulp.task 'watch', ->
gulp-livereload.listen silent: true
gulp.watch 'sass/*.sass', <[sass]> .on \change, gulp-livereload.changed
gulp.watch './*.jade', <[jade]> .on \change, gulp-livereload.changed
gulp.watch './*.html', <[html]> .on \change, gulp-livereload.changed
gulp.watch 'js/*js', <[js]> .on \change, gulp-livereload.changed
gulp.task 'build', <[jade sass html js assets]>
gulp.task 'dev', <[build server watch]>
gulp.task 'default', <[build]>