-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
50 lines (40 loc) · 1.12 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
path = require 'path'
gulp = require 'gulp'
coffee = require 'gulp-coffee'
webpack = require 'webpack-stream'
cssimport = require 'gulp-cssimport'
gulp.task 'coffee/web', ->
gulp.src 'src/public/js/*.coffee'
.pipe coffee()
.pipe gulp.dest 'build/js/'
gulp.task 'js/web', gulp.series 'coffee/web', ->
gulp.src ['build/js/index.js']
.pipe webpack
resolve:
modules:[
"node_modules"
path.resolve __dirname,"build","js"
]
output:
filename: 'index.js'
.pipe gulp.dest 'public/js/'
gulp.task 'css', ->
gulp.src ['src/public/css/*']
.pipe cssimport
includePaths:[
'build/css',
'node_modules'
]
.pipe gulp.dest 'public/css'
gulp.task 'html', ->
gulp.src ['src/public/html/*.html']
.pipe gulp.dest 'public/'
gulp.task 'coffee/app', ->
gulp.src 'src/app/*.coffee'
.pipe coffee()
.pipe gulp.dest 'app/'
gulp.task 'app', gulp.series 'coffee/app'
gulp.task 'web', gulp.parallel 'js/web','html','css'
gulp.task 'default', gulp.parallel 'app','web'
gulp.task 'watch', ->
gulp.watch 'src/public/**/*', gulp.parallel 'web'