@wurk/command-build v0.1.6
Wurk Build Command
Build workspaces using auto-detected tools.
- Vite:
vite.config*.*
- Rollup:
rollup.config*.*
- TypeScript:
[src/]tsconfig*.json
(where noEmit != true) - TypeDoc:
typedoc*.(js|json)
Getting Started
Install the command in your root workspace.
npm install --save-dev @wurk/command-build
Run the command.
wurk build
Each build tool is run once per matching configuration file. So, if there are two tsconfig*.json
files in a workspace, the tsc
command will be run twice in that workspace.
Start (Watch)
Using the start
command alias or the --start
option will build all workspaces once, and then continue in "watch" mode (Rollup, TypeScript, TypeDoc) and/or start development servers (Vite).
wurk start
wurk build --start
Options
--start
(or command aliasstart
)- Start development servers and/or watch for changes and rebuild.
--no-clean
- Do not clean workspace directories before building.
--no-include-dependencies
- Do not include dependency workspaces when building or starting.
Package Scripts
The wurk:build
and wurk:start
package scripts are special. If wurk:build
is present, it disables all other tools that might be used to build the workspace. Likewise, if work:start
is present, it is the only thing that will be run to start a workspace. These scripts serve as an escape hatch for workspaces where tool/configuration auto detection won't work.
File: package.json
{
"scripts": {
"wurk:build": "...",
"wurk:start": "..."
}
}