this is a cli tool for generating distribution files for your deno project, using esbuild + esbuild-deno-loader.
to provide input file(s), list them as --input="./path/to/file.ts" (or -i="./path/to/file.ts" for shorthand), and do it for each input file that you have.
the paths that you provide must be relative to your configured "deno.json" file (which is also usually your working dir).
if no input is provided, this tool reads your "deno.json" file to figure out the entry-points of your library (specified in the exports field), and then runs esbuild to get your javascript distribution files ready.
this tool comes with a handful of useful preset configurations, so that you won't have to write lengthy cli args.
take a look at CliArgs and CliConfigJson to see what configuration options are available.
moreover, to use this document generator via javascript instead of the shell, use the buildDist function from the dist.ts file (or jsr:@oazmi/build-tools/dist if using jsr).
Example
# bundle the three files "./src/mod.ts", "./src/plugins/hello.ts", and "./src/plugins/world.ts" in the "./dist/" folder, with code-splitting and minification enabled. denorun-A"jsr:@oazmi/build-tools/cli/dist"--dir="./dist/"--passes=2--log="basic"--minify--split--input="./src/mod.ts"-i="./src/plugins/hello.ts"-i="./src/plugins/world.ts"
Example
# do a mock-run (dryrun) of the bundling process of your "deno.json" exports in the "./dist/" folder, with code-splitting and minification enabled. denorun-A"jsr:@oazmi/build-tools/cli/dist"--dir="./dist/"--passes=2--log="verbose"--minify--split--dryrun
this is a cli tool for generating distribution files for your deno project, using
esbuild
+ esbuild-deno-loader.to provide input file(s), list them as
--input="./path/to/file.ts"
(or-i="./path/to/file.ts"
for shorthand), and do it for each input file that you have. the paths that you provide must be relative to your configured "deno.json" file (which is also usually your working dir).if no input is provided, this tool reads your "deno.json" file to figure out the entry-points of your library (specified in the exports field), and then runs esbuild to get your javascript distribution files ready.
this tool comes with a handful of useful preset configurations, so that you won't have to write lengthy cli args.
take a look at CliArgs and CliConfigJson to see what configuration options are available.
moreover, to use this document generator via javascript instead of the shell, use the buildDist function from the
dist.ts
file (orjsr:@oazmi/build-tools/dist
if using jsr).Example
Example