Building and testing aurelia
Get setup to build and test the Aurelia 2 source!
If you're looking to contribute directly to Aurelia or its test suite, you've come to the right place!
Here's what you'll learn...
Setting up your machine and cloning the Aurelia repository.
Building the entire Aurelia 2 monorepo.
Running tests in the browser and Node.js.
Setup
In order to build Aurelia, ensure that you have Git, Node.js v15.4.0 or higher, and [email protected] or higher installed.
Run the following commands to clone, install:
git clone https://github.com/aurelia/aurelia.git && cd aurelia
npm cipackages
From the root level of the project, run npm run dev to start the development. This will:
build & watch the
runtimepackage for rebuildbuild & watch the
runtime-htmlpackage for rebuildbuild & watch the
__testing__package for rebuildstart a process to run all the tests with
karma
Example scenarios:
Fixing a repeater bug, so run all the repeater tests and rebuild repeater source code on change:
npm run dev -- --test repeaterFixing a router bug, so run all the router tests and rebuild router source code on change:
npm run dev -- --dev router --test routerThe
--dev(shortcut:-d) is to specify what additional package besideruntime&runtime-htmlpackages should be rebuild on changesThe
--test(shortcut:-t) is to specify what glob to search test files to run
This documentation will be expanded upon in the future.
packages-tooling
Similar to core packages, to develop/test any of the tooling packages, run npm run dev:tooling to start the development. This will
build & watch the
kernelcore package for rebuildbuild & watch the
plugin-conventionstooling package for rebuildstart a process to run all the tests with
mocha
Example scenarios:
Fixing a convention bug, so run all the plugin convention tests, and rebuild
plugin-conventionstooling package on code change:
npm run dev -- --test plugin-conventions
# or
npm run dev -- --test conventionsFixing a webpack loader bug, sp run all the load tests and rebuild webpack loader code on change
npm run dev -- --dev webpack-loader --test loaderLast updated
Was this helpful?