Pull requests that add support for other platforms are more than welcome!

Test the cltools

Run the tests once:

npm test

Or run the tests in watch-mode:

npm run test:watch

Local Development

To test your local version of cltools in a Duxis project, cd into the project's root directory and execute:

rm -f dx
ln -s <path-to-duxis-cltools>/dx.sh dx

To restore the project, execute:

rm -f dx
npm install

Manual

The duxis-cltools provides the command line utility dx, which facilitates the development, testing and deployment of Duxis projects.

To develop, test or deploy a Duxis project, you first need to build the project with the dx build command. You can build in one of the four following modes. The DX_ENV columns shows the value for the DX_ENV environment variable in

Command

Mode

DX_ENV

NODE_ENV

Description

./dx build

Production

prod

production

The default mode for deployment.

./dx build --dev

Development

dev

development

The standard development mode.

./dx build --dxdev

Duxis-development

dxdev

development

To be used when co-developing Duxis Foundation. (1)

./dx build --test

Test

test (prod(2))

test

To be used for running the tests.

./dx build --dxtest

Test

test (dxdev(2))

test

To be used for running the tests when co-developing Duxis Foundation.

Note that to use the _dxdev_ or _dxtest_ modes, the `DXF_PATH` environment variable in your `.env` file should be properly configured.

The build-time environment.

The following table shows the values for the NODE_ENV and DX_ENV environment variables for each of the standard Duxis project modes.

Mode

NODE_ENV

DX_ENV

production

production

prod

test/dxtest

test

test

development

development

dev

dxdev

development

dxdev

Once you've built in one of these modes, you can use the other commands, depending on the mode, as shown in the following table: