The official CLI command for building Dojo 2 applications.
WARNING This is currently alpha software. This is not yet production ready, so you should use at your own risk.
To use @dojo/cli-build-app
in a single project, install the package:
npm install @dojo/cli-build-app
@dojo/cli-build-app
is an optional command for the @dojo/cli
.
There are three modes available to build a Dojo 2 application, dist
, dev
and test
. The mode required can be passed using the --mode
flag:
dojo build app --mode dist
The built application files are written to the output/{mode selected}
directory
Note: dist
is the default mode and so can be run without any arguments, dojo build app
.
The dist
mode create a production ready build.
The dev
mode creates an application build that has been optimized for debugging and development.
The test
mode creates bundles that can be used to run the unit and functional tests of the application.
Eject is not currently supported by cli-build-app
.
We appreciate your interest! Please see the Dojo 2 Meta Repository for the Contributing Guidelines. This repository uses prettier for code style and is configured with a pre-commit hook to automatically fix formatting issues on staged .ts
files before performing the commit.
To start working with this package, clone the repository and run npm install
.
In order to build the project run grunt dev
or grunt dist
.
Builds a new test artifact from the repository source code and re-installs the test-app
dependencies before running all unit and functional tests.
Builds and packages cli-build-app
as dojo-cli-build-app.tgz
in the dist
directory.
Re-generates the test fixtures in test-app
. Assumes that the dependencies have been installed for the test app.
Runs prettier on all .ts
files in the src
and tests
directories, this will fix any detected code style violations.
Test cases MUST be written using Intern using the BDD test interface and Assert assertion interface.
90% branch coverage MUST be provided for all code submitted to this repository, as reported by istanbul’s combined coverage results for all supported platforms.
The command is tested by running via the Dojo CLI and asserting the build output against known fixtures. To do this, a test artifact needs to be built and installed into the test-app
:
npm test
Once the test artifact has been installed, if there have been no changes to the command code grunt test
can be used to repeat the tests.
© 2017 JS Foundation. New BSD license.