$ gulp unit: Run Karma against all src/scripts/**/*.spec.js files.
$ gulp e2e: Run Protractor against all e2e/**/*.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: Generate CHANGELOG.md file from Git metadata. See Change Log for more info.
Environments
Default: NODE_ENV=development and PORT=8080.
Development:
$ gulp build serve is equivalent to
$ NODE_ENV=development PORT=8080 gulp build serve.
Production
$ NODE_ENV=production gulp build serve.
Ecosystem
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.
Change Log
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.
Recommended Workflow
Make changes
Commit those changes
Make sure Travis turns green
Bump version in package.json
Run gulp changelog
Commit package.json and CHANGELOG.md files
Tag
Push
Contributing
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.
请发表评论