create distribution file(s) for your deno project.
the buildDist function in this module provides a convenient way for you to bundle your deno-project using esbuild.
for more advanced bundling, use the bundle function, then proceed with additional transformations via the transform function,
and then finally write the output to your filesystem via the createFiles utility function.
constbundled_files = awaitbundle({ // when no input files are provided, the function reads your "deno.json" file to use its "exports" field as the input. input: { "my-lib.js":"./src/mod.ts", "plugins/hello.js":"./src/plugins/hello.ts", "plugins/world.js":"./src/plugins/world.ts", }, deno:"./deno.json", dir:"./dist/", log:"verbose", esbuild: { splitting:true } }) constminified_files = awaittransform(bundled_files, [{}]) awaitcreateFiles(minified_files, { dir:"./dist/", // this information is not really needed, as the file paths in `minified_files` are absolute. dryrun:false, log:"verbose", }) // your output files are now saved to: "./dist/my-lib.js", "./dist/plugins/hello.js", and "./dist/plugins/world.js"
// it is important that you stop esbuild manually, otherwise the deno process will not quit automatically. awaitesStop()
create distribution file(s) for your deno project.
the buildDist function in this module provides a convenient way for you to bundle your deno-project using
esbuild
.for more advanced bundling, use the bundle function, then proceed with additional transformations via the transform function, and then finally write the output to your filesystem via the createFiles utility function.
Example