duo-build
v0.2.1
Published
An opinionated build tool that produces both CJS and ESM powered by esbuild.
Maintainers
Readme
duo-build
An opinionated build tool that produces both CJS and ESM powered by esbuild.
Since duo-build is opinionated, it makes the following assumptions about your project:
- It is TypeScript based.
- Its entrypoint is
src/index.ts. - If it is a CLI app it will have a
src/cli.tsscript which will act as an additional entrypoint (for ESM only). - Build artifacts are placed in
dist. Which hascjs,esm, andtypessubdirectories. - The
tsconfig.jsonwill specify the"declaration": true,"emitDeclarationOnly": true, and"outDir": "./dist/types"compiler options.
Install
As a development dependency:
npm install --save-dev duo-buildOr use without installing:
npx duo-buildUsage
$ duo-build --help
An opinionated build tool that produces both CJS and ESM powered by esbuild.
Usage
$ duo-build
Options
--external, -e Mark a file or a package as external to exclude it from the
build. Can be specified multiple times.
--help, -h Display this message.
--packages, -p Whether package dependencies are bundled with or excluded
from the build. Can be set to "bundle" or "external".
Defaults to "bundle".
--platform, -P The platform to build for ("browser", "neutral", or "node").
Defaults to "browser".
--version, -v Display the application version.License
The BSD 3-Clause License. See the license file for details.
