banira compile

Compile one or more TypeScript files with banira's compiler defaults.

Usage

$ banira compile <files...> [options]

Arguments

ArgumentDescription
<files...>TypeScript files to compile.

Options

OptionDescription
-p, --project <path>Path to a tsconfig.json whose options override the defaults.
-o, --output <path>Directory to write the emitted JavaScript to.
--import-map [path]Also emit an import map (esm.sh) for the components’ bare imports; optional output path.
--optimize-cssRun inlined CSS through lightningcss (lower nesting, minify). Optional dependency.
--no-source-mapDo not emit source maps (which embed the original TypeScript).

Examples

compile to dist/
$ banira compile src/my-button.ts -o dist
also pin bare imports to a CDN
$ banira compile src/my-button.ts -o dist --import-map

Notes

Uses Compiler.DEFAULT_COMPILER_OPTIONS unless you pass your own via --project. The underlying Compiler is also available as a library export. Each .js ships a .js.map (original TypeScript embedded) by default — pass --no-source-map for production builds. With --import-map, bare imports resolve in the browser from esm.sh with no bundler.