-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfuse.js
More file actions
executable file
·49 lines (43 loc) · 850 Bytes
/
fuse.js
File metadata and controls
executable file
·49 lines (43 loc) · 850 Bytes
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
const { FuseBox, WebIndexPlugin, EnvPlugin } = require('fuse-box')
const { TypeHelper } = require('fuse-box-typechecker')
class TypeCheckerPlugin {
constructor() {
this.checker = TypeHelper({
tsConfig: './tsconfig.json',
basePath: './',
tsLint: './tslint.json',
name: 'Test Sync'
})
this.checker.startTreadAndWait()
}
postBundle() {
this.checker.useThreadAndTypecheck()
}
}
const fuse = FuseBox.init({
homeDir: 'src',
target: 'browser@es6',
output: 'dist/$name.js',
automaticAlias: false,
alias: {
src: '~/'
},
plugins: [
WebIndexPlugin({
template: 'static/index.html'
}),
EnvPlugin({
NODE_ENV: 'dev'
}),
new TypeCheckerPlugin()
]
})
fuse.dev({
port: 3000
})
fuse
.bundle('app')
.instructions('> index.ts')
.hmr()
.watch()
fuse.run()