tinybundle is a minimalist command-line module bundler, currently at version 2.0.0, designed for simple bundling tasks without the complexity of modern bundlers like Webpack or Rollup. It distinguishes itself by eschewing a JavaScript API, relying solely on CLI arguments and a `tbdeps.json` configuration file. This file specifies a list of npm packages and local JavaScript files (prefixed with `!`), optionally allowing for pre-processing commands (prefixed with `?`) to be executed via `system` calls before bundling. The tool does not support traditional loaders, opting instead for this external command execution model. Its release cadence is not specified, but it targets users looking for an extremely lightweight, no-frills bundling solution where custom pre-processing can be scripted externally. It consolidates dependencies and local code into a single, minified output file.
npm install tinybundleVerified import paths — ran on the pinned version, not inferred.
Demonstrates bundling a third-party npm package (jQuery) and a local JavaScript file into a single output file using the tinybundle CLI and `tbdeps.json` configuration. The output bundle's content is then displayed.
Interact with tinybundle only via the command line or through shell scripts.
Utilize the `?` prefix in `tbdeps.json` to execute external commands (e.g., Babel, Buble, TypeScript compiler) to transform files before bundling. Ensure the output of these commands is then included with `!`.
Carefully vet any commands executed via the `?` prefix. Avoid running untrusted commands or scripts with elevated privileges.
For projects requiring complex optimizations, code splitting, or handling of non-JavaScript assets (images, CSS), consider using more advanced bundlers like Webpack, Rollup, or esbuild.
Run `npm install <package-name>` for all required npm packages before executing the `tinybundle` command.
Ensure all required npm packages are installed via `npm install <package-name>` in your project.
Install tinybundle globally using `npm install -g tinybundle` or run it via `npx tinybundle`.
Add a pre-processing step using the `?` prefix in `tbdeps.json` to transpile your code (e.g., `?npx buble input.jsx -o output.js`) before including the output with `!`.
No dependency data recorded yet.