RJS Command Line Interface
ReworkJS comes bundled with a command line interface which handles tasks such as launching, building or testing your app.
It only comes installed locally by default. But you can install @reworkjs/cli to gain access to it from anywhere.
--env <NODE_ENV>: Sets the NODE_ENV environment variable for the lifetime of the process.
--verbose <verbosity>: Sets the verbosity of the output. Defaults to
Installs and initializes the reworkjs framework. You can launch it again as many times as you wish to configure new elements that might have been added after your initial installation.
Builds and launches the application.
The compiler will launch in watch mode if the
NODE_ENV variable is set to
--port: The port on which the static and pre-rendering server will respond to HTTP requests.
--ssr: By default,
rjs startwill launch without Server-Side Rendering to reduce compilation time. Use
--ssrto enable Server Side Rendering.
--no-split: By default, starting the app with pre-rendering will create a split view in the terminal with the output of the pre-rendering server builder, the client bundle builder, and the pre-rendering server itself. You can revert back to a regular CLI display using this option.
Builds the application.
rjs build <...parts> [options]
parts: Which parts of the application to build. Either "server" for the pre-rendering server, "client" for the browser bundle, or both separated by a space.
Dumps the computed framework configuration. For debug purposes.