-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuse.js
35 lines (29 loc) · 888 Bytes
/
fuse.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
const {
FuseBox,
Sparky,
HTMLPlugin,
WebIndexPlugin,
ImageBase64Plugin,
CopyPlugin
} = require('fuse-box');
const fuseBox = FuseBox.init({
homeDir: './src/',
output: './dist/$name.js',
sourceMaps: true,
plugins: [
ImageBase64Plugin(),
// HTMLPlugin({useDefault:false}),
// WebIndexPlugin({template: './src/index.html'})
]
});
fuseBox.bundle("js/background.js").watch().instructions(">chrome/background/index.ts");
fuseBox.bundle("js/content_script.js").watch().instructions(">chrome/content/index.ts");
Sparky.task('copyManifest', () => {
return Sparky.watch('./src/manifest.json').dest('./dist/$name');
});
Sparky.task('copyImage', () => {
return Sparky.watch('./src/img/*.*').dest('./dist/img/$name');
});
Sparky.task('copy', ['copyManifest', 'copyImage'], () => {});
Sparky.start('copy');
fuseBox.run();