-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.ls
51 lines (46 loc) · 1.54 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
45
46
47
48
49
50
51
require! \browserify
require! \gulp
require! \gulp-livescript
require! \gulp-mocha
{instrument, hook-require, write-reports} = (require \gulp-livescript-istanbul)!
require! \gulp-streamify
require! \gulp-uglify
{each} = require \prelude-ls
source = require \vinyl-source-stream
gulp.task \build, ->
gulp.src <[./index.ls ./transformation-context.ls]>
.pipe gulp-livescript!
.pipe gulp.dest \./
gulp.task \dist, <[build]>, ->
[
<[./index pipeTransformation]>
<[./transformation-context transformationContext]>
] |> each ([file-name, export-name]) ->
browserify standalone: export-name, debug: false
.add "#{file-name}.js"
.exclude \highland
.exclude \JSONStream
.exclude \moment
.exclude \prelude-ls
.exclude \prelude-extension
.exclude \rx
.exclude \socket.io-client
.exclude \stream
.exclude \transpilation
.exclude \./transformation-context
.bundle!
.pipe source "#{file-name}.min.js"
.pipe (gulp-streamify gulp-uglify!)
.pipe gulp.dest \./dist
gulp.task \watch, ->
gulp.watch <[./index.ls ./transformation-context.ls]>, <[build]>
gulp.task \coverage, ->
gulp.src <[./index.ls ./transformation-context.ls]>
.pipe instrument!
.pipe hook-require!
.on \finish, ->
gulp.src <[./test/index.ls]>
.pipe gulp-mocha!
.pipe write-reports!
.on \finish, -> process.exit!
gulp.task \default, <[build watch]>