-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.cirru
64 lines (56 loc) · 1.44 KB
/
gulpfile.cirru
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
var
gulp $ require :gulp
sequence $ require :run-sequence
exec $ . (require :child_process) :exec
env $ object
:dev true
:main :http://localhost:8080/build/main.js
:vendor :http://localhost:8080/build/vendor.js
gulp.task :rsync $ \ (cb)
var
wrapper $ require :rsyncwrapper
wrapper.rsync
object
:ssh true
:src $ array :index.html :build :src
:recursive true
:args $ array :--verbose
:dest :tiye:~/repo/origami-ui/react-origami-notifications
:deleteAll true
\ (error stdout stderr cmd)
if (? error)
do $ throw error
console.error stderr
console.log cmd
cb
gulp.task :script $ \ ()
var
script $ require :gulp-cirru-script
... gulp
src :src/*.cirru
pipe $ script
pipe $ gulp.dest :lib/
gulp.task :html $ \ (cb)
var
html $ require :./template
fs $ require :fs
assets
if (not env.dev) $ do
= assets $ require :./build/assets.json
= env.main $ + :./build/ assets.main
= env.vendor $ + :./build/ assets.vendor
fs.writeFile :index.html (html env) cb
gulp.task :del $ \ (cb)
var
del $ require :del
del (array :build) cb
gulp.task :webpack $ \ (cb)
var
command $ cond env.dev :webpack ":webpack --config webpack.min.cirru --progress"
exec command $ \ (err stdout stderr)
console.log stdout
console.log stderr
cb err
gulp.task :build $ \ (cb)
= env.dev false
sequence :del :webpack :html cb