Alternatives:
- Angular 2 Official CLI: https://cli.angular.io/
- Angular 2 Official Seed: https://github.com/angular/angular2-seed
- Gulp fully automated workflow.
- Development and production environment targets.
- Unit and E2E test samples.
- Code coverage report with TypeScript mapping.
- TypeScript definition manager, linting, sourcemaps and transpilation (ES5).
- Sass linting, sourcemaps and transpilation.
- TypeDoc documentation generator.
- Change Log generated based on Git metadata.
- Directives
- Pipes
- Services
- Router
- REST API
- Template Cache
- Modular Components
- Dependency Injection
- Custom Events
Dependency | Version | Install |
---|---|---|
NodeJS | 5.x.x | http://node.org |
npm | 3.x.x | http://node.org |
Gulp CLI | 0.4.x | npm install gulpjs/gulp-cli#4.0 -g |
Typings | 0.6.x | npm install typings -g |
$ git clone https://github.com/ghpabs/angular2-seed-project.git && cd angular2-seed-project
$ npm install
$ typings install
$ gulp build serve
Note: the serve
task won't automatically launch the browser for you.
To view the app please open a new tab and go to http://localhost:8080/
.
$ gulp clean
: Remove generated folders -build
,docs
andcoverage
.$ gulp unit
: Run Karma against allsrc/scripts/**/*.spec.js
files.$ gulp e2e
: Run Protractor against alle2e/**/*.spec.js
files. The project must be being served before running end-to-end tests.$ gulp build
: Create distribution package.$ gulp serve
: Start web-server and live-reload.$ gulp docs
: Generate documentation.$ gulp changelog
: GenerateCHANGELOG.md
file from Git metadata. See Change Log for more info.
Default: NODE_ENV=development
and PORT=8080
.
$ gulp build serve
is equivalent to$ NODE_ENV=development PORT=8080 gulp build serve
.
$ NODE_ENV=production gulp build serve
.
You might have noticed that we have quite a few files in our root
folder. You might also be wondering why we need them and whether they are applicable to your use case. Here is a brief explanation:
- .travis.yml: Travis is our Continuous Integration (CI) server and this is its configuration file. We have added hooks to GitHub so automated tests will kick in after each commit.
- karma.shim.js: Unit testing Angular2 apps is still in its early days and this file helps us setup the test runner - Karma.
This project generates the CHANGELOG.md
from Git metadata using the conventional-changelog library. The commit message must follow the Angular conventions for this feature to work.
- Make changes
- Commit those changes
- Make sure Travis turns green
- Bump version in
package.json
- Run
gulp changelog
- Commit
package.json
andCHANGELOG.md
files - Tag
- Push
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. When submitting a PR, make sure that the commit messages match the Angular conventions.
MIT