This package contains various convenience tools for codebase transformation, documentation generation, and code bundling.
Under the hood, it relies on:
esbuild
+esbuild-deno-loader
for bundling.dnt
for deno to node project transformation.typedoc
for documentation generation.
To generate documentation for your typescript project through the shell, simply run:
deno run -A "jsr:@oazmi/build-tools/cli/docs"
To generate documentation through scripting (and get an understanding of the configurable options), follow the example:
import { buildDocs, defaultBuildDocsConfig, type BuildDocsConfig } from "jsr:@oazmi/build-tools/docs"
const my_config: BuildDocsConfig = {
...defaultBuildDocsConfig,
dir: "./mydocs/",
site: "./mydocs/",
preserveTemporary: false,
typedoc: {
// place optional typedoc configurations here
githubPages: true,
},
text: ["./helloworld.txt", "Konichiwa Meena-San!\nShine\' Kuda Sai Meena-San!\nSosshtte Arigato yo Meena-San Desu Desu!"],
}
const docs_artifacts = await buildDocs(my_config)
alert("press any button to delete the generated docs in:", my_config.dir)
// cleanup the generated documentation html site under "./mydocs/"
docs_artifacts.cleanup()
To transform your deno project to a node-based project through the shell, simply run:
deno run -A "jsr:@oazmi/build-tools/cli/npm" --install
To transform to a node-based project through scripting (and get an understanding of the configurable options), follow the example:
import { buildNpm, defaultBuildNpmConfig, type BuildNpmConfig } from "jsr:@oazmi/build-tools/npm"
const my_config: BuildNpmConfig = {
...defaultBuildNpmConfig,
dir: "./npm-release/",
dnt: {
// place optional dnt configurations here
typeCheck: true,
declaration: "inline",
test: true,
skipNpmInstall: false,
},
text: ["./helloworld.txt", "Konichiwa Meena-San!\nShine\' Kuda Sai Meena-San!\nSosshtte Arigato yo Meena-San Desu Desu!"]
}
const npm_artifacts = await buildNpm(my_config)
alert("press any button to delete the generated npm-build in:", my_config.dir)
// cleanup the generated npm-build under "./npm-release/"
npm_artifacts.cleanup()