Build commands

All commands available for executing to build, test, and deploy CHT Core Framework

CHT Core build commands

These commands are defined in the package.json and can be executed with npm run <command> from the cht-core repository directory.

Development build commands

For developers (humans) to execute to build cht-core.

CommandDescription
build-ddocsCompiles all the DDocs and outputs them into /api/build/ddocs ready for deployment.
build-devUpdates dependencies and builds all the applications.
build-dev-watchSame as build-dev, but keeps watching for any code changes and automatically deploys on change.
build-documentationExecutes jsdoc on all the applications.
build-webapp-devCompiles the /webapp application.
build-cht-formCompiles the cht-form web component.
copy-api-resourcesCopies the static api files into the api build directory ready for deployment.
dev-apiSets up and runs the api server, and automatically deploys source changes.
dev-sentinelSets up and runs the sentinel server, and automatically deploys source changes.
local-imagesBuilds the docker images and updates the docker compose files.
update-service-workerUpdates the service worker file for deployment.

Development test commands

For developers to execute to test cht-core.

CommandDescription
integration-all-localCompiles the app and executes the integration test suite except for the sentinel tests.
integration-apiCompiles the app and executes the api integration test suite.
integration-sentinel-localCompiles the app and executes the sentinel integration test suite.
lintPerforms static analysis checks on the codebase.
testSame as running lint, unit, and integration-api.
unitExecutes unit test suites for all applications.
unit-adminExecutes the unit test suite on admin.
unit-apiExecutes the unit test suite on api.
unit-sentinelExecutes the unit test suite on sentinel.
unit-shared-libExecutes the unit test suite on all shared-lib modules.
unit-webappExecutes the unit test suite on webapp.
unit-webapp-continuousExecutes the unit test suite on webapp, and re-runs on code change.
wdio-default-mobile-localCompiles the app and executes the mobile e2e test suite.
wdio-localCompiles the app and executes the default e2e test suite.
wdio-standard-localCompiles the app and executes the standard e2e test suite.
wdio-cht-formExecutes the default e2e test suite on code change.

CI commands

For Continuous Integration (robots) to run to build and test cht-core.

CommandDescription
buildCompiles, minifies, bundles the code, and builds the DDocs for publishing.
ci-compileBuilds, does static analysis, and runs unit tests for all applications.
ci-e2e-integrationExecutes the integration e2e test suite.
ci-webdriver-defaultExecutes the default e2e test suite.
ci-webdriver-default-mobileExecutes the mobile e2e test suite.
ci-webdriver-standardExecutes the standard e2e test suite.
publish-for-testingBuilds docker images and publishes to the staging server for use in e2e test builds.
test-config-defaultExecutes the default config test suite.
test-config-standardExecutes the standard config test suite.
upgrade-wdioExecutes the upgrade e2e test suite.