I am very glad to see this project living with PR from contributors who trust in it. Here is some guidelines to keep the contributions useful and efficient.
- Checkout the repository
- Run
npm install
- Run
bower install
This module uses the classic AngularJS stack with:
- Karma (test runner)
- Jasmine (assertion framework)
- angular-mocks (AngularJS module for testing)
Run the test with the grunt task grunt test
. It runs the tests with different versions of AngularJS.
Tests are build around modules with a specific $stateProvider
configuration:
- Basic configuration: Basic definitions (no template, no controller)
- Interpolation configuration: States with bindings in
ncyBreadcrumbLabel
- HTML configuration: States with HTML in
ncyBreadcrumbLabel
- Sample configuration: Bridge towards the sample app configuration for using in tests
- UI-router's configuration: Clone of the UI-router sample app (complemented with breadcrumb configuration)
Theses modules are loaded by Karma and they are available in test specifications.
Specifications are generally related to the directive ncyBreadcrumb
or the service $breadcrumb
.
If you are not familiar with JS testing. You can run the sample locally for testing purposes by using grunt sample
. Sources are live-reloaded after each changes.
- Fork the repository
- Make your changes in a new git branch following the coding rules below.
- Run the grunt default task (by typing
grunt
orgrunt default
): it will run the tests and build the module indist
directory) - Commit the changes (including the
dist
directory) by using the commit conventions explained below. - Push and make the PR
- When making changes on the source file, please check that your changes are covered by the tests. If not, create a new test case.
angular-breadcrumb uses the same strict conventions as AngularJS and UI-router. These conventions are explained here.
It is very important to fit these conventions especially for types fix
and feature
which are used by the CHANGELOG.md generation (it uses the grunt-conventional-changelog).