@tinycode/bundl
is a lightweight wrapper around
deno_emit.
It is useful for bundling local files, npm packages, or jsr packages. Any other modules eg. deno/x can be bundled via url. It is also useful for writing types of existing javascript and typescript files.
For npm packages,
@tinycode/bundl
fetches dependencies via
esm.sh
Bundling is often necessary for debugging, script minification, or creating offline applications. For online applications or cutting-edge projects, it is recommended to use URLs directly from jsr, npm or esm.sh
deno install -frgA jsr:@tinycode/bundl -n bundl
or
deno install -frg --allow-read --allow-write --allow-env --allow-net jsr:@tinycode/bundl -n bundl
bundl script.ts -o output.js
Url
bundl url -o output.js
JSR package
bundl -j @scope/package -o packageName.js
NPM package
bundl -n packageName -o packageName.mjs
-h show this help message
-o output file name
-j Retrieve package from jsr.io
-n Retrieve npm package via esm.sh
-t Retrieve types of npm packages (-n also needed)
This project is licensed under the MIT License.
Some dependencies may be licensed under different terms. (see LICENSES for more details)
Add Package
deno add jsr:@tinycode/bundl
Import symbol
import * as bundl from "@tinycode/bundl";
---- OR ----
Import directly with a jsr specifier
import * as bundl from "jsr:@tinycode/bundl";
Add Package
npx jsr add @tinycode/bundl
Import symbol
import * as bundl from "@tinycode/bundl";
Add Package
yarn dlx jsr add @tinycode/bundl
Import symbol
import * as bundl from "@tinycode/bundl";
Add Package
pnpm dlx jsr add @tinycode/bundl
Import symbol
import * as bundl from "@tinycode/bundl";
Add Package
bunx jsr add @tinycode/bundl
Import symbol
import * as bundl from "@tinycode/bundl";