Light-weight and easy to use seed project for Angular 2 apps.
- Gulp fully automated workflow.
- Development and production environment targets.
- Official Angular 2 tutorial app implementation.
- Unit and E2E test samples.
- Code coverage report with TypeScript mapping.
- TypeScript linting, sourcemaps and transpilation (ES5).
- Sass linting, sourcemaps and transpilation.
TypeDoc documentation generator.(Currently disabled. See issue #26.)
$ git clone https://github.com/ghpabs/angular2-seed.git && cd angular2-seed
$ npm 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
: RunKarma
against alltest/unit/*.spec.js
files. The project must have been previously built as test are ran against the.js
transpiled files.$ gulp e2e
: RunProtractor
against alltest/e2e/*.e2e.js
files. The project must be being served before running end-to-end tests.$ gulp build
: Create distribution package. See environmenttargets
below.$ gulp serve
: Start web-server and live-reload. See environmenttargets
below.
Use --dev
and --prod
modifiers for development and production targets where --dev
is the default modifier.
$ gulp build serve
is equivalent to$ gulp build serve --dev
.$ gulp build serve --prod
.
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 Continuos Integration (CI) server and this is its configuration file. We have added hooks to GitHub so automated tests will kick in after each commit.
- deploy.sh: This file enable us to deploy our application after every successful build in the CI server.
- karma.shim.js: Unit testing Angular2 apps is still in its early days and this file helps us setup the test runner - Karma.
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