#
Command line options
#
ts-bridge build
The main (and currently only) command. It can be called without specifying it, simply by running:
$ ts-bridge
Or by specifying the command explicitly:
$ ts-bridge build
#
--clean
- Alias:
-c
- Type:
boolean
Remove the dist
directory before building the project.
$ ts-bridge build --clean
Note
The dist
directory is based on the outDir
option in the tsconfig.json
file. There is no command line option to change this directory.
#
--format
- Alias:
-f
- Type:
string[]
Specify the output formats to build. The available formats are module
and
commonjs
. By default, both formats are built.
$ ts-bridge --format module
$ ts-bridge --format commonjs
$ ts-bridge --format module,commonjs
#
--project
- Alias:
-p
- Type:
string
Specify the path to the tsconfig.json
file to use for the build.
$ ts-bridge build --project tsconfig.build.json
#
--references
- Alias:
--build
- Type:
boolean
Whether to build project references. By default, project references are built if
they are detected in the tsconfig.json
file.
$ ts-bridge build --references
#
--shims
- Type:
boolean
- Default:
true
Enable or disable shims for CommonJS and ESM environments. Shims are enabled by
default. To disable them, specify --shims false
, or --no-shims
.
$ ts-bridge build --shims false
$ ts-bridge build --no-shims
#
--verbose
- Alias:
-v
- Type:
boolean
Enable verbose logging. The tool will output more information about the build process.
$ ts-bridge build --verbose