On-demand bundle analyzer, powered by esbuild.
This little terminal app exists because Bundlephobia and bundlejs are pretty cool and useful, but bundling locally and with offline support can easily work more reliably.
esbuild are used.npm install -g banal
https://github.com/fabiospampinato/banal/assets/1812093/554327fa-c070-44af-89fb-52eff57a70ce
Some example usages:
# Analyze a single module
banal crypto-sha
# Analyze a single module, at a specific version
banal crypto-sha@1.0.0
# Analyze a single module, with the module flag set explicitly (optional)
banal -m crypto-sha
# Analyze a single local module
banal ./src/index.ts
# Analyze a single namespaced module
banal @fabiospampinato/is
# Analyze multiple modules together
banal crypto-sha crypto-puzzle
# Analyze a Node module
banal -p node -m banal
# Analyze an esbuild metafile
banal -M ./path/to/metafile.json
# Analyze a single module with a custom input file
banal -m @fabiospampinato/is -i 'export {isWeakRef} from "@fabiospampinato/is";'
# Analyze a module with some custom defined globals
banal --define '{"process.env.NODE_ENV": "\"production\""}' crypto-sha
# Output the esbuild analysis to a custom path
banal --output-analysis analysis.html crypto-sha
# Output the esbuild metafile to a custom path
banal --output-metafile metafile.json crypto-sha
66 commits
1 commits
HTML
76.8%
TypeScript
19.8%
JavaScript
3.4%
On-demand bundle analyzer, powered by esbuild.
This little terminal app exists because Bundlephobia and bundlejs are pretty cool and useful, but bundling locally and with offline support can easily work more reliably.
esbuild are used.npm install -g banal
https://github.com/fabiospampinato/banal/assets/1812093/554327fa-c070-44af-89fb-52eff57a70ce
Some example usages:
# Analyze a single module
banal crypto-sha
# Analyze a single module, at a specific version
banal crypto-sha@1.0.0
# Analyze a single module, with the module flag set explicitly (optional)
banal -m crypto-sha
# Analyze a single local module
banal ./src/index.ts
# Analyze a single namespaced module
banal @fabiospampinato/is
# Analyze multiple modules together
banal crypto-sha crypto-puzzle
# Analyze a Node module
banal -p node -m banal
# Analyze an esbuild metafile
banal -M ./path/to/metafile.json
# Analyze a single module with a custom input file
banal -m @fabiospampinato/is -i 'export {isWeakRef} from "@fabiospampinato/is";'
# Analyze a module with some custom defined globals
banal --define '{"process.env.NODE_ENV": "\"production\""}' crypto-sha
# Output the esbuild analysis to a custom path
banal --output-analysis analysis.html crypto-sha
# Output the esbuild metafile to a custom path
banal --output-metafile metafile.json crypto-sha
66 commits
1 commits
HTML
76.8%
TypeScript
19.8%
JavaScript
3.4%