2.0.0 • Published 2 years ago
tinybundle v2.0.0
tinybundle
Bundle your React, jQuery, Vue, Svelte, and every other package on NPM and your own code!
CLI arguments
This utility only uses the CLI. The only argument it takes is the output file path.
Specifying packages
Create a file called tbdeps.json
and put the following in here (just change the packages):
["package1", "package2", "etc"]
These indexes are packages on NPM. They have to be in node_modules.
Adding a JS file
This would be:
["!index.js"] // just prepend "!" to the filename
Loaders
tinybundle does not support loaders. However, it can use commands like so:
["?npx buble index.jsx -o index.js"] // just prepend "?"
It essentially reads:
[
"jquery",
"jsxtoastring",
"!test.js",
"?npx buble app.jsx -o app.js"
"!app.js"
]
to:
system("npm install jquery");
append("jquery's entrypoint");
system("npm install jsxtoastring");
append("jsxtoastring's entrypoint");
append("file called test.js");
system("npx buble app.jsx -o app.js");
append("file called app.js");
minify();