forked from bvaughn/js-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flyfile.js
43 lines (37 loc) · 813 Bytes
/
flyfile.js
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
const paths = {
dist: 'dist/',
source: 'source/**/*.ts',
tests: 'tests/**/*.js'
}
const files = {
main: 'js-search.js',
minified: 'js-search.min.js'
}
export default function* () {
yield this.start('build')
}
export function* build () {
yield this.clear(paths.dist)
yield this
.source(paths.source)
.ts({
module: 'umd',
preserveConstEnums: true,
removeComments: true,
sourceMap: true
})
.concat(files.main)
.target(paths.dist)
yield this
.source(paths.dist + files.main, 'source/node-export.js')
.concat(files.main)
.target(paths.dist)
yield this
.source(paths.dist + files.main)
.uglify()
.concat(files.minified)
.target(paths.dist)
}
export function* watchAndBuild () {
yield this.watch(paths.source, 'build')
}