Skip to content

Command Line Interface

Lewie9021 edited this page Dec 21, 2014 · 1 revision

It is possible to run the compiler via command line. Simply install the module globally via NPM:

npm install -g node-compiler

Once the module has installed, the compiler will be accessible directly through the terminal. For quick parameter lookup, you can enter the following:

node-compiler --help

This command will list the possible parameters and their functions when using the compiler. Currently there are only a few parameters and are listed below:

Key Description
help Outputs a list of supported parameter.
config Path to the configuration file.
mode ID of a mode within the configuration file to use.
debug Optional parameter for running in debug mode.

A typical usage example of the compiler via command line is shown below. This will read the the configuration object from 'C:\Development\MyProject\config.json' and launch the compiler using the 'dev' mode.

node-compiler --config C:\Development\MyProject\config.json --mode dev