Project Watchtower exposes the project-watchtower
and pwt
executables
pwt build [<target>] [<environment>] [-p <project dir>]
target
: server, clientenvironment
: dev, debug, prod
Leaving the target out builds both server and client.
Leaving the environment out builds for production by default.
pwt clean [<glob> ...] [-p <project dir>]
Cleans the default paths SERVER_OUTPUT
, CLIENT_OUTPUT
as well as all .js
and .maps
files in /client
, /server
and /common
. You can pass in additional glob patterns to be cleaned.
pwt explore-bundle [disableHoisting] [-p <project dir>]
Opens the webpack-bundle-analyzer
for the client production bundle.
disableHoisting
: Disable scope hosting to identify where all the modules are coming from
pwt start [watch] [prod] [debug] [client] [-p <project dir>]
watch
: Enable watch mode and rebuild client after changesprod
: SetNODE_ENV
to"production"
debug
: Start node process with--inspect
for debugging and performance measurement in chrome://inspectclient
: Start internal server that serves only the client
pwt watch [server] [client] [debug] [-p <project dir>]
Builds the server in dev mode, then watches and rebuilds the client
server
: Also watches and rebuilds the serverclient
: Only run client without a serverdebug
: Start node process with--inspect
for debugging and performance measurement in chrome://inspect