Gulp tasks
The Aurelia CLI leverages Gulp as its task runner, providing a series of predefined tasks to streamline your development process. These tasks are located in the aurelia_project/tasks
directory.
Task Execution
Tasks can be executed using the au
command. For example:
Build the application:
Executes the Gulp task exported from
aurelia_project/tasks/build.js
.Run tests:
Executes the task from
aurelia_project/tasks/test.js
.
Note: The CLI executes the task exported as default
. You can export multiple tasks from a single file:
Executing the above using au task1
will run task1
.
Creating a New Task
You can create custom tasks to extend the CLI's functionality:
Create a new file: Add a
.js
or.ts
file in theaurelia_project/tasks
directory.Export the task function:
Run the task: Use
au myCustomTask
to execute it.
Task Metadata
To integrate custom tasks with the CLI help system, define task metadata in a .json
file with the same name as the task. For example, for build.js
, create build.json
:
Last updated
Was this helpful?