forked from fuse-box/fuse-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
24 lines (23 loc) · 716 Bytes
/
test.js
File metadata and controls
24 lines (23 loc) · 716 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
const path = require('path');
process.env.FUSEBOX_DIST_ROOT = __dirname;
process.env.FUSEBOX_VERSION = '2.4.0';
process.env.PROJECT_NODE_MODULES = path.join(__dirname, 'node_modules');
process.env.SPARKY_LOG = false;
process.env.LOGGING = false;
process.env.DYNAMIC_IMPORTS_DISABLED = true;
const {FuseBox} = require('./bin/fusebox');
let file = process.argv[2];
let special = file && file.match(/^--file=(.*)/);
let mask = '*.test.ts';
if (special) {
mask = special = special[1];
}
const fuse = FuseBox.init({
homeDir: "src",
target : "server@esnext",
log : false,
dynamicImportsEnabled : false,
output: ".fusebox/$name.js",
cache: false
});
fuse.bundle("fusebox").test(`[**/${mask}]`);