Package Exports
- fuse-box
- fuse-box/dist/commonjs/BundleSource
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fuse-box) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
FuseBox - A Bundle that does it right
The library is under heavy development.
let fuseBox = new FuseBox({
homeDir: "test/fixtures/cases/case1"
});
Example
true/false - standalone
fuseBox.bundle("[**/*.js]", true).then(content => {
})
Using with virtual file structure
You can provide a virtual structure, in this case homeDir
will be ignored, and a collection will be used. Due to the library node-glob limitations, FuseBox creates a corresponding structure in the file system (in .tmp) folder. It goes with absolutely the same approach as homeDir
(it's just shifted)
You can use it to with gulp, or any other build systems, where files are ephemeral e.g streams.
let fuseBox = new FuseBox({
fileCollection: {
"index.js": "require('./foo/bar.js')",
"foo/bar.js": "require('../hello.js')",
"hello.js": "",
}
});
fuseBox.bundle("> index.js **/*.js", true).then(content => {
fs.writeFileSync("./out.js", content);
})
Cases
> index.js [**/*.js]
- Bundle everything without dependencies, and execute index.js
[**/*.js]
- Bundle everything without dependencies
**/*.js
- Bundle everything with dependencies
**/*.js -path
- Bundle everything with dependencies except for path