To build the plugin, follow these steps.
- Ensure that NodeJS is installed. This provides the platform on which the build tooling runs.
- From the project folder, execute the following command:
npm install
- Ensure that Gulp is installed globally. If you need to install it, use the following command:
npm install -g gulp
Note: Gulp must be installed globally, but a local version will also be installed to ensure a compatible version is used for the project.
- To build the plugin in the background, execute the following command:
gulp watch
- Link your plugin with an Aurelia app for local development and testing:
npm link
# at this point, change the directory to your Aurelia app, e.g.
cd ../aurelia-skeleton-navigation
# if using Webpack, simply run:
npm link aurelia-skeleton-plugin
# if using JSPM you will need to re-run this
# after every change you make to your code:
jspm link -y aurelia-skeleton-plugin
- Make your Aurelia app load the plugin by adding the following line to the
configure
function in themain.js
file of yoursrc
folder, e.g.
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging();
+ aurelia.use.plugin('aurelia-skeleton-plugin');
aurelia.start().then(a => a.setRoot());
}
To run the unit tests, simply run the command:
npm test