Builds the library into the desired module formats at the specified location.
Looking for Node API docs? View companion build()
documentation.
Build module formats in default output directory:
benmvp build
To specify an alternate output directory:
benmvp build --out ./built
NOTE: You will need to manually update the default "main"
, "module"
, "jsnext:main"
, "browser"
, and "types"
properties in your package.json
to reflect the new location of the built module formats.
To exclude type definitions:
benmvp build --formats esm cjs
To put ESM & type declarations in an alternate build location with continuous watch:
benmvp build --formats esm type --out ./built --watch
A space-separated list of the module formats to build. Aliased as -f
. Available formats:
type
- Typescript definition files (.d.ts
) so that clients of your library can use your library fully-typedesm
- ECMAScript module format (everything transpiled to ES5 except for ES2015import
/export
statements enabling tree shaking)cjs
- CommonJS format (fully transpiled)
Optional. Defaults to all formats.
A path (relative or absolute) to the output directory for the built module formats. Aliased as -o
.
If you chose 'esm'
as one of the formats
and choose './built'
as the output directory, the ESM files will live at ./built/esm
.
Optional. Defaults to ./lib
.
A flag indicating whether or not to continuously generate the built module formats whenever source files change. This is most useful if you've linked your library into a host application (with npm link
or yarn link
). Aliased as -w
.
Optional. Defaults to false
.
Looking for Node API docs? View companion build()
documentation.
Still unsure of how to use @benmvp/cli
? Ask for help!