-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.jisp
59 lines (45 loc) · 2.09 KB
/
gulpfile.jisp
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
(= gulp (require "gulp")
plug ((require "gulp-load-plugins")))
(def handle stream
(stream.on "error" (fn err (do
(plug.util.log err)
(plug.util.log "\x07\x07\x07\x07\x07")
(stream.end)))))
(mac task name pre ...args (do
(if (and (not (Array.isArray pre)) (? pre))
(do (args.unshift pre)
(= pre ``())))
(if (is args.length 0)
(= pipeline `())
(do (= pipeline `(do (console.log (+ "Running task " ,name))
(handle (,(args.shift) ,(args.shift)))))
(while (> args.length 0) (do
(= left (args.shift)
right (args.shift))
(pipeline.push `(.pipe (handle (,left ,right))))))))
`(gulp.task ,name ,pre (fn ,pipeline))))
(task "css"
gulp.src "allmychanges/static/allmychanges/stylus/{allmychanges,email}.styl"
plug.stylus ()
gulp.dest "allmychanges/static/allmychanges/css/")
(task "jisp"
gulp.src "allmychanges/static/allmychanges/jisp/*.jisp"
plug.concat "allmychanges.jisp"
plug.jisp ()
gulp.dest "allmychanges/static/allmychanges/js/")
(task "webpack"
gulp.src "allmychanges/static/allmychanges/js/react-site.js"
plug.webpack (output: (filename: "allmychanges/static/allmychanges/js-compiled/react-site.js")
module: (loaders: (list
(test: /\.js$/ loader: "jsx")
; (test: /\.css$/ loader: "style!css")
(test: /\.styl$/ loader: "style!css!stylus")))
externals: ("react": "React"))
plug.userStory ()
gulp.dest "./")
(gulp.task "watch" (fn (do
(gulp.watch "allmychanges/static/allmychanges/jisp/*.jisp" `("jisp"))
(gulp.watch "allmychanges/static/allmychanges/js/**/*.js" `("webpack"))
(gulp.watch "allmychanges/static/allmychanges/js/**/*.styl" `("webpack"))
(gulp.watch "allmychanges/static/allmychanges/stylus/**/*.styl" `("css")))))
(task "default" `("jisp" "watch"))