diff --git a/.docker/Dockerfile_dev b/.docker/Dockerfile_dev new file mode 100644 index 000000000..8c8190f72 --- /dev/null +++ b/.docker/Dockerfile_dev @@ -0,0 +1,22 @@ +FROM node:9.11 + +WORKDIR /home/node/angular-seed + +# NB: Only copy files that are required by 'npm install' +# The 'src' directory will be mounted as a shared volume by docker-compose (allowing for live-reload) +COPY package.json . +COPY package-lock.json . +COPY gulpfile.ts . +COPY tsconfig.json . +COPY tslint.json . +COPY tools ./tools/ +COPY .docker/rm.optional.deps.js ./.docker/rm.optional.deps.js + +# before switching to non-root user, change ownership of home +RUN chown -R node:node . +USER node + +# NB: this is a workaround due to the fact that npm '--no-optional' flag doesn't work (open script below for more) +RUN node .docker/rm.optional.deps.js + +RUN npm install --no-optional diff --git a/.docker/Dockerfile_prod b/.docker/Dockerfile_prod new file mode 100644 index 000000000..7a24d804e --- /dev/null +++ b/.docker/Dockerfile_prod @@ -0,0 +1,33 @@ +FROM node:9.11 as builder + +WORKDIR /home/node/angular-seed + +# try to make good use of docker cache: don't copy our source files until after install +# because there is no need to bust the "npm install" cache layer if only the app source files have changed +COPY package.json package-lock.json gulpfile.ts tsconfig.json tslint.json ./ +COPY tools ./tools/ +COPY .docker/rm.optional.deps.js ./.docker/rm.optional.deps.js + +# before switching to non-root user, change ownership of home +RUN chown -R node:node . +USER node + +# NB: this is a workaround due to the fact that npm '--no-optional' flag doesn't work (open script below for more) +RUN node .docker/rm.optional.deps.js + +RUN npm install --no-optional + +COPY src ./src/ +COPY .docker/rm.optional.types.js ./.docker/rm.optional.types.js + +# temporarily switch back to root user to fix ownership of the newly added files +USER root +RUN chown -R node:node src .docker/rm.optional.types.js +USER node + +RUN node .docker/rm.optional.types.js +RUN npm run build.prod.rollup.aot + +FROM nginx:1.13 +COPY --from=builder /home/node/angular-seed/dist/prod /var/www/dist/prod +COPY ./.docker/nginx.conf /etc/nginx/conf.d/angular-seed.template diff --git a/.docker/angular-seed.development.dockerfile b/.docker/angular-seed.development.dockerfile deleted file mode 100644 index a086ac423..000000000 --- a/.docker/angular-seed.development.dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM node:6.6 - -# prepare a user which runs everything locally! - required in child images! -RUN useradd --user-group --create-home --shell /bin/false app - -ENV HOME=/home/app -WORKDIR $HOME - -ENV APP_NAME=angular-seed - -# before switching to user we need to set permission properly -# copy all files, except the ignored files from .dockerignore -COPY . $HOME/$APP_NAME/ -RUN chown -R app:app $HOME/* - -USER app -WORKDIR $HOME/$APP_NAME - -RUN npm install diff --git a/.docker/angular-seed.production.dockerfile b/.docker/angular-seed.production.dockerfile deleted file mode 100644 index a086ac423..000000000 --- a/.docker/angular-seed.production.dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM node:6.6 - -# prepare a user which runs everything locally! - required in child images! -RUN useradd --user-group --create-home --shell /bin/false app - -ENV HOME=/home/app -WORKDIR $HOME - -ENV APP_NAME=angular-seed - -# before switching to user we need to set permission properly -# copy all files, except the ignored files from .dockerignore -COPY . $HOME/$APP_NAME/ -RUN chown -R app:app $HOME/* - -USER app -WORKDIR $HOME/$APP_NAME - -RUN npm install diff --git a/.docker/rm.optional.deps.js b/.docker/rm.optional.deps.js new file mode 100644 index 000000000..57224e585 --- /dev/null +++ b/.docker/rm.optional.deps.js @@ -0,0 +1,12 @@ +const fs = require('fs'); + +/** + * This is a workaround due to 'npm install --no-optional' not working as expected: + * https://github.com/npm/npm/issues/17633 + * https://github.com/npm/npm/issues/20769 + * To be used when building docker images, since they don't need test libraries installed + */ +// package.json +const npmPackage = JSON.parse(fs.readFileSync('package.json')); +delete npmPackage['optionalDependencies']; +fs.writeFileSync('package.json', JSON.stringify(npmPackage, null, 2)); diff --git a/.docker/rm.optional.types.js b/.docker/rm.optional.types.js new file mode 100644 index 000000000..5b46aeaf5 --- /dev/null +++ b/.docker/rm.optional.types.js @@ -0,0 +1,11 @@ +const fs = require('fs'); + +/** + * Fixme is there a better way to handdle optional types in tsconfig.json ? + */ +let tsConfigJson = 'src/client/tsconfig.json'; // only copied in the prod image +if (fs.existsSync(tsConfigJson)) { + const tsConfig = JSON.parse(fs.readFileSync(tsConfigJson)); + tsConfig['compilerOptions']['types'] = tsConfig['compilerOptions']['types'].filter(t => t !== 'jasmine'); + fs.writeFileSync(tsConfigJson, JSON.stringify(tsConfig, null, 2)); +} diff --git a/.dockerignore b/.dockerignore index c35a2827b..f6a454d57 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,7 @@ # compiled output dist tmp +sme # dependencies node_modules @@ -13,19 +14,25 @@ bower_components .classpath *.launch .settings/ +.editorconfig # misc .sass-cache connect.lock coverage/* +coverage_js/* libpeerconnection.log npm-debug.log testem.log typings -# e2e +# test +*.spec.ts e2e/*.js e2e/*.map +test-config.js +test-main.js +karma.conf.js #System Files .DS_Store diff --git a/.gitignore b/.gitignore index a9b7f4612..b311be517 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,9 @@ lib-cov coverage coverage_js +# Directory for source-map-explorer reports +sme + # ignore documentation documentation @@ -46,6 +49,7 @@ docs lib test tmp +cypress/videos gulpfile.js gulpfile.js.map @@ -54,3 +58,7 @@ gulpfile.js.map .DS_Store src/client/app/shared/config/env.config.js src/client/app/shared/config/env.config.js.map + +tools/env/env-config.interface.d.ts +tools/env/env-config.interface.ngsummary.json +tools/manual_typings/project/sample.package.ngsummary.json diff --git a/.travis.yml b/.travis.yml index 6b617d5f3..3d307d09f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,12 @@ sudo: false install: true # yarn bug addons: - firefox: "45.0" + firefox: latest + chrome: stable os: - linux - - osx +# - osx before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi @@ -20,9 +21,9 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi before_script: - - npm install + - npm ci - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then nohup bash -c "webdriver-manager start 2>&1 &"; fi # Protractor CI + after_failure: - cat /home/travis/build/mgechev/angular-seed/npm-debug.log @@ -39,7 +40,8 @@ notifications: on_start: never # options: [always|never|change] default: always cache: - directories: node_modules + directories: + - "$HOME/.npm" script: - - npm run tests.all && npm run build.prod.exp + - npm run tests.all diff --git a/.vscode/tasks.json b/.vscode/tasks.json index db97a736a..b5bf37ae7 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,7 +7,7 @@ "tasks": [ { "taskName": "tslint", - "args": [ "run", "gulp", "tslint", "--color" ], + "args": [ "run", "lint" ], "problemMatcher": { "owner": "tslint", "fileLocation": [ diff --git a/README.md b/README.md index 66eae375e..67391168a 100644 --- a/README.md +++ b/README.md @@ -1,605 +1,3 @@ -# Introduction +# No longer under active maintenance -[![Angular Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://angular.io/styleguide) -[![Build Status](https://travis-ci.org/mgechev/angular-seed.svg?branch=master)](https://travis-ci.org/mgechev/angular-seed) -[![Build Status](https://ci.appveyor.com/api/projects/status/jg5vg36w0klpa00e/branch/master?svg=true)](https://ci.appveyor.com/project/mgechev/angular2-seed) -[![Join the chat at https://gitter.im/mgechev/angular2-seed](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mgechev/angular2-seed?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Dependency Status](https://david-dm.org/mgechev/angular-seed.svg)](https://david-dm.org/mgechev/angular-seed) -[![devDependency Status](https://david-dm.org/mgechev/angular-seed/dev-status.svg)](https://david-dm.org/mgechev/angular-seed#info=devDependencies) - -Provides fast, reliable and extensible starter for the development of Angular projects. - -`angular-seed` provides the following features: - -- Allows you to painlessly update the seed tasks of your already existing project. -- Supports multiple Angular applications with shared codebase in a single instance of the seed. -- Official Angular i18n support. -- Ready to go, statically typed build system using gulp for working with TypeScript. -- Production and development builds. -- **Ahead-of-Time** compilation support. -- Sample unit tests with Jasmine and Karma including code coverage via [istanbul](https://gotwarlost.github.io/istanbul/). -- End-to-end tests with Protractor. -- Development server with Livereload. -- Following the [best practices](https://angular.io/styleguide). -- Manager of your type definitions using @types. -- Has autoprefixer and css-lint support. -- Provides full Docker support for both development and production environment - -# How to start - -**Note** that this seed project requires node v4.x.x or higher and npm 2.14.7 but in order to be able to take advantage of the complete functionality we **strongly recommend node >=v6.5.0 and npm >=3.10.3**. - -**Here is how to [speed-up the build on Windows](https://github.com/mgechev/angular-seed/wiki/Speed-up-the-build-on-Windows)**. - -In order to start the seed use: - - -```bash -$ git clone --depth 1 https://github.com/mgechev/angular-seed.git -$ cd angular-seed - -# install the project's dependencies -$ npm install -# fast install (via Yarn, https://yarnpkg.com) -$ yarn install # or yarn - -# watches your files and uses livereload by default -$ npm start -# api document for the app -# npm run build.docs - -#generate api documentation -$ npm run compodoc -$ npm serve.compodoc - - -# to start deving with livereload site and coverage as well as continuous testing -$ npm run start.deving - -# dev build -$ npm run build.dev -# prod build -$ npm run build.prod - -# dev build of multiple applications (by default the value of --app is "app") -$ npm start -- --app baz -$ npm start -- --app foo -$ npm start -- --app bar -``` -_Does not rely on any global dependencies._ - -# How to start with AoT compilation - -**Note** that AoT compilation requires **node v6.5.0 or higher** and **npm 3.10.3 or higher**. - -In order to start the seed with AoT use: - -```bash -# prod build with AoT compilation -$ npm run build.prod.exp -``` - -# Dockerization - -The application provides full Docker support. You can use it for both development as well as production builds and deployments. - -## How to build and start the dockerized version of the application - -The Dockerization infrastructure is described in the `docker-compose.yml` (respectively `docker-compose.production.yml`. -The application consists of two containers: -- `angular-seed` - In development mode, this container serves the angular app. In production mode it builds the angular app, with the build artifacts being served by the Nginx container -- `angular-seed-nginx` - This container is used only production mode. It serves the built angular app with Nginx. - -## Development build and deployment - -Run the following: - -```bash -$ docker-compose build -$ docker-compose up -d -``` - -Now open your browser at http://localhost:5555 - -## Production build and deployment - -Run the following: - -```bash -$ docker-compose -f docker-compose.production.yml build -$ docker-compose -f docker-compose.production.yml up angular-seed # Wait until this container has finished building, as the nginx container is dependent on the production build artifacts -$ docker-compose -f docker-compose.production.yml up -d angular-seed-nginx # Start the nginx container in detached mode -``` - -Now open your browser at http://localhost:5555 - -# Table of Contents - -- [Introduction](#introduction) -- [How to start](#how-to-start) -- [How to start with Aot](#how-to-start-with-aot-compilation) -- [Dockerization](#dockerization) - + [How to build and start the dockerized version of the application](#how-to-build-and-start-the-dockerized-version-of-the-application) - + [Development build and deployment](#development-build-and-deployment) - + [Production build and deployment](#production-build-and-deployment) -- [Table of Content](#table-of-content) -- [Configuration](#configuration) -- [Environment Configuration](#environment-configuration) -- [Tools documentation](#tools-documentation) -- [How to extend?](#how-to-extend) -- [Running tests](#running-tests) -- [Contributing](#contributing) -- [Advanced Seed Option](#advanced-seed-option) -- [Examples](#examples) -- [Directory Structure](#directory-structure) -- [Contributors](#contributors) - - [Wiki Contributors](#wiki-contributors) -- [Change Log](#change-log) -- [License](#license) - -# Configuration - -Default application server configuration - -```js -var PORT = 5555; -var LIVE_RELOAD_PORT = 4002; -var DOCS_PORT = 4003; -var APP_BASE = '/'; -``` - -Configure at runtime - -```bash -$ npm start -- --port 8080 --reload-port 4000 --base /my-app/ -``` - -## Environment configuration - -If you have different environments and you need to configure them to use different end points, settings, etc. you can use the files `dev.ts` or `prod.ts` in`./tools/env/`. The name of the file is environment you want to use. - -The environment can be specified by using: - -```bash -$ npm start -- --env-config ENV_NAME -``` - -Currently the `ENV_NAME`s are `dev`, `prod`, `staging`, but you can simply add a different file `"ENV_NAME.ts".` file in order to alter extra such environments. - -# Tools documentation - -A documentation of the provided tools can be found in [tools/README.md](tools/README.md). - -# How to extend? - -Visit the [Wiki page](https://github.com/mgechev/angular-seed/wiki) of the project. - -# How to update? -``` -git remote add upstream https://github.com/mgechev/angular2-seed -git pull upstream master -``` - -# Running tests - -```bash -$ npm test - -# Development. Your app will be watched by karma -# on each change all your specs will be executed. -$ npm run test.watch -# NB: The command above might fail with a "EMFILE: too many open files" error. -# Some OS have a small limit of opened file descriptors (256) by default -# and will result in the EMFILE error. -# You can raise the maximum of file descriptors by running the command below: -$ ulimit -n 10480 - - -# code coverage (istanbul) -# auto-generated at the end of `npm test` -# view coverage report: -$ npm run serve.coverage - -# e2e (aka. end-to-end, integration) - In three different shell windows -# Make sure you don't have a global instance of Protractor -# Make sure you do have Java in your PATH (required for webdriver) - -# npm install webdriver-manager <- Install this first for e2e testing -# npm run webdriver-update <- You will need to run this the first time -$ npm run webdriver-start -$ npm run serve.e2e -$ npm run e2e - -# e2e live mode - Protractor interactive mode -# Instead of last command above, you can use: -$ npm run e2e.live -``` -You can learn more about [Protractor Interactive Mode here](https://github.com/angular/protractor/blob/master/docs/debugging.md#testing-out-protractor-interactively) - -# Contributing - -Please see the [CONTRIBUTING](https://github.com/mgechev/angular-seed/blob/master/.github/CONTRIBUTING.md) file for guidelines. - -# Advanced Seed Option - -An [advanced option to this seed exists here](https://github.com/NathanWalker/angular-seed-advanced) which mirrors the latest changes here but adds core support for: - -- [ngrx/store](https://github.com/ngrx/store) RxJS powered state management, inspired by **Redux** -- [ngrx/effects](https://github.com/ngrx/effects) Side effect model for @ngrx/store -- [ng2-translate](https://github.com/ocombe/ng2-translate) for i18n - - Usage is optional but on by default - - Up to you and your team how you want to utilize it. It can be easily removed if not needed. -- [angulartics2](https://github.com/angulartics/angulartics2) Vendor-agnostic analytics for Angular applications. - - Out of box support for [Segment](https://segment.com/) - - When using the seed, be sure to change your `write_key` [here](https://github.com/NathanWalker/angular-seed-advanced/blob/master/src/client/index.html#L24) - - Can be changed to any vendor, [learn more here](https://github.com/angulartics/angulartics2#supported-providers) -- [lodash](https://lodash.com/) Helps reduce blocks of code down to single lines and enhances readability -- [NativeScript](https://www.nativescript.org/) cross platform mobile (w/ native UI) apps. [Setup instructions here](#nativescript-app). -- [Electron](http://electron.atom.io/) cross platform desktop apps (Mac, Windows and Linux). [Setup instructions here](#electron-app). - -You may use it to learn how to extend this seed for your own use cases or use the advanced seed if your project needs those features. - -# Examples - -Forks of this project demonstrate how to extend and integrate with other libraries: - - - https://github.com/mgechev/switching-to-angular2 - code samples for the book ["Switching to Angular 2"](https://www.packtpub.com/web-development/switching-angular-2). - - https://github.com/DeviantJS/angular2-seed-postcss - Extending PostCSS with precss / cssnext for Sass-like features. - - https://github.com/DeviantJS/angular2-seed-material2 - integration with [Angular2-Material](https://github.com/angular/material2). - - https://github.com/AngularShowcase/angular2-sample-app - sample Angular application. - - https://github.com/AngularShowcase/ng2-bootstrap-sbadmin - ng2-bootstrap-sbadmin. - - https://github.com/AngularShowcase/angular2-seed-ng2-highcharts - Simple application including a [Highcharts](http://www.highcharts.com) graph. - - https://github.com/tarlepp/angular-sailsjs-boilerplate-frontend-angular2 - Example application for [Sails.js](http://sailsjs.org/) integration. - - https://github.com/ludohenin/ng2-wp-blog - Angular application using Wordpress [JSON-API](http://v2.wp-api.org) backend.. - - https://github.com/AngularShowcase/angular2-seed-example-mashup - Angular application demonstrating the use of [Redux](http://redux.js.org/), [D3](https://github.com/mbostock/d3), [socket io](https://github.com/socketio), [Google Charts](https://developers.google.com/chart/), and [RxJs](https://github.com/Reactive-Extensions/RxJS). - - https://github.com/tiagomapmarques/angular2-seed-phaser/tree/releases - integration with [Phaser](http://phaser.io/). - - https://github.com/vyakymenko/angular2-seed-express - integration with [Express](https://expressjs.com/) full-stack development. - - https://github.com/UIUXEngineering/angular2-jspm-typescript-seed - integration with [JSPM](http://jspm.io/). - -# Directory Structure - -``` -. -├── .docker -│   ├── dist-build.development.dockerfile <- Dockerfile for development environment -│   └── dist-build.production.dockerfile <- Dockerfile for production environment -├── .dockerignore <- ignore file for the docker builds -├── LICENSE -├── README.md -├── appveyor.yml -├── docker-compose.production.yml <- docker-compose file for production environment -├── docker-compose.yml. <- docker-compose file for development environment -├── gulpfile.ts <- configuration of the gulp tasks -├── karma.conf.js <- configuration of the test runner -├── package.json <- dependencies of the project -├── protractor.conf.js <- e2e tests configuration -├── src <- source code of the application -│   └── client -│   ├── app -│   │   ├── about -│   │   │   ├── about.component.css -│   │   │   ├── about.component.e2e-spec.ts -│   │   │   ├── about.component.html -│   │   │   ├── about.component.spec.ts -│   │   │   ├── about.component.ts -│   │   │   ├── about.module.ts -│   │   │   ├── about.routes.ts -│   │   │   └── index.ts -│   │   ├── app.component.e2e-spec.ts -│   │   ├── app.component.html -│   │   ├── app.component.spec.ts -│   │   ├── app.component.ts -│   │   ├── app.module.ts -│   │   ├── app.routes.ts -│   │   ├── home -│   │   │   ├── home.component.css -│   │   │   ├── home.component.e2e-spec.ts -│   │   │   ├── home.component.html -│   │   │   ├── home.component.spec.ts -│   │   │   ├── home.component.ts -│   │   │   ├── home.module.ts -│   │   │   ├── home.routes.ts -│   │   │   └── index.ts -│   │   ├── i18n.providers.ts -│   │   ├── main-prod.ts -│   │   ├── main.ts -│   │   ├── operators.ts -│   │   ├── shared -│   │   │   ├── config -│   │   │   │   └── env.config.ts -│   │   │   ├── index.ts -│   │   │   ├── name-list -│   │   │   │   ├── index.ts -│   │   │   │   ├── name-list.service.spec.ts -│   │   │   │   └── name-list.service.ts -│   │   │   ├── navbar -│   │   │   │   ├── index.ts -│   │   │   │   ├── navbar.component.css -│   │   │   │   ├── navbar.component.html -│   │   │   │   └── navbar.component.ts -│   │   │   ├── shared.module.ts -│   │   │   └── toolbar -│   │   │   ├── index.ts -│   │   │   ├── toolbar.component.css -│   │   │   ├── toolbar.component.html -│   │   │   └── toolbar.component.ts -│   │   └── system-config.ts -│   ├── assets -│   │   ├── data.json -│   │   └── favicon -│   │   ├── favicon-DEV.ico -│   │   └── favicon-PROD.ico -│   │   └── svg -│   │   └── more.svg -│   ├── css -│   │   └── main.css -│   ├── index.html -│   └── tsconfig.json -├── test-config.js <- testing configuration -├── test-main.js <- karma test launcher -├── tools -│   ├── README.md <- build documentation -│   ├── config -│   │   ├── banner-256.txt -│   │   ├── banner.txt -│   │   ├── project.config.ts <- configuration of the specific project -│   │   ├── seed.config.interfaces.ts -│   │   └── seed.config.ts <- generic configuration of the seed project -│   │   └── seed.tslint.json <- generic tslint configuration of the seed project -│   ├── config.ts <- exported configuration (merge both seed.config and project.config, project.config overrides seed.config) -│   ├── debug.ts -│   ├── env <- environment configuration -│   │   ├── base.ts -│   │   ├── dev.ts -│   │   ├── env-config.interface.ts -│   │   └── prod.ts -│   ├── manual_typings -│   │   ├── project <- manual ambient typings for the project -│   │   │   └── sample.package.d.ts -│   │   └── seed <- seed manual ambient typings -│   │   ├── autoprefixer.d.ts -│   │   ├── cssnano.d.ts -│   │   ├── express-history-api-fallback.d.ts -│   │   ├── istream.d.ts -│   │   ├── karma.d.ts -│   │   ├── merge-stream.d.ts -│   │   ├── open.d.ts -│   │   ├── operators.d.ts -│   │   ├── slash.d.ts -│   │   ├── systemjs-builder.d.ts -│   │   └── tildify.d.ts -│   ├── tasks <- gulp tasks -│   │   ├── assets_task.ts -│   │   ├── css_task.ts -│   │   ├── project <- project specific gulp tasks -│   │   │   └── sample.task.ts -│   │   └── seed <- seed generic gulp tasks. They can be overriden by the project specific gulp tasks -│   │   │   ├── build.assets.dev.ts -│   │   │   ├── build.assets.prod.ts -│   │   │   ├── build.bundle.rxjs.ts -│   │   │   ├── build.bundles.app.exp.ts -│   │   │   ├── build.bundles.app.ts -│   │   │   ├── build.bundles.ts -│   │   │   ├── build.docs.ts -│   │   │   ├── build.html_css.ts -│   │   │   ├── build.index.dev.ts -│   │   │   ├── build.index.prod.ts -│   │   │   ├── build.js.dev.ts -│   │   │   ├── build.js.e2e.ts -│   │   │   ├── build.js.prod.exp.ts -│   │   │   ├── build.js.prod.ts -│   │   │   ├── build.js.test.ts -│   │   │   ├── build.tools.ts -│   │   │   ├── check.tools.ts -│   │   │   ├── check.versions.ts -│   │   │   ├── clean.all.ts -│   │   │   ├── clean.coverage.ts -│   │   │   ├── clean.dev.ts -│   │   │   ├── clean.prod.ts -│   │   │   ├── clean.tools.ts -│   │   │   ├── clear.files.ts -│   │   │   ├── compile.ahead.prod.ts -│   │   │   ├── copy.prod.ts -│   │   │   ├── e2e.ts -│   │   │   ├── generate.manifest.ts -│   │   │   ├── karma.run.ts -│   │   │   ├── karma.run.with_coverage.ts -│   │   │   ├── karma.watch.ts -│   │   │   ├── minify.bundles.ts -│   │   │   ├── print.banner.ts -│   │   │   ├── serve.coverage.ts -│   │   │   ├── serve.coverage.watch.ts -│   │   │   ├── serve.docs.ts -│   │   │   ├── server.prod.ts -│   │   │   ├── server.start.ts -│   │   │   ├── start.deving.ts -│   │   │   ├── tslint.ts -│   │   │   ├── watch.dev.ts -│   │   │   ├── watch.e2e.ts -│   │   │   ├── watch.test.ts -│   │   │   └── webdriver.ts -│   │   ├── task.ts -│   │   └── typescript_task.ts -│   ├── utils <- build utils -│   │   ├── project <- project specific gulp utils -│   │   │   └── sample_util.ts -│   │   ├── project.utils.ts -│   │   ├── seed <- seed specific gulp utils -│   │   │   ├── clean.ts -│   │   │   ├── code_change_tools.ts -│   │   │   ├── karma.start.ts -│   │   │   ├── server.ts -│   │   │   ├── tasks_tools.ts -│   │   │   ├── template_locals.ts -│   │   │   ├── tsproject.ts -│   │   │   └── watch.ts -│   │   └── seed.utils.ts -│   └── utils.ts -├── tsconfig.json <- configuration of the typescript project (ts-node, which runs the tasks defined in gulpfile.ts) -├── tslint.json <- tslint configuration -└── yarn.lock -``` - -# Contributors - -[mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[d3viant0ne](https://github.com/d3viant0ne) |[Shyam-Chen](https://github.com/Shyam-Chen) |[Nightapes](https://github.com/Nightapes) |[tarlepp](https://github.com/tarlepp) | -:---: |:---: |:---: |:---: |:---: |:---: | -[mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[d3viant0ne](https://github.com/d3viant0ne) |[Shyam-Chen](https://github.com/Shyam-Chen) |[Nightapes](https://github.com/Nightapes) |[tarlepp](https://github.com/tarlepp) | - -[NathanWalker](https://github.com/NathanWalker) |[TheDonDope](https://github.com/TheDonDope) |[nareshbhatia](https://github.com/nareshbhatia) |[kiuka](https://github.com/kiuka) |[hank-ehly](https://github.com/hank-ehly) |[robstoll](https://github.com/robstoll) | -:---: |:---: |:---: |:---: |:---: |:---: | -[NathanWalker](https://github.com/NathanWalker) |[TheDonDope](https://github.com/TheDonDope) |[nareshbhatia](https://github.com/nareshbhatia) |[kiuka](https://github.com/kiuka) |[hank-ehly](https://github.com/hank-ehly) |[robstoll](https://github.com/robstoll) | - -[daniru](https://github.com/daniru) |[jesperronn](https://github.com/jesperronn) |[njs50](https://github.com/njs50) |[vyakymenko](https://github.com/vyakymenko) |[sasikumardr](https://github.com/sasikumardr) |[aboeglin](https://github.com/aboeglin) | -:---: |:---: |:---: |:---: |:---: |:---: | -[daniru](https://github.com/daniru) |[jesperronn](https://github.com/jesperronn) |[njs50](https://github.com/njs50) |[vyakymenko](https://github.com/vyakymenko) |[sasikumardr](https://github.com/sasikumardr) |[aboeglin](https://github.com/aboeglin) | - -[ryzy](https://github.com/ryzy) |[markwhitfeld](https://github.com/markwhitfeld) |[eppsilon](https://github.com/eppsilon) |[sfabriece](https://github.com/sfabriece) |[gkalpak](https://github.com/gkalpak) |[jerryorta-dev](https://github.com/jerryorta-dev) | -:---: |:---: |:---: |:---: |:---: |:---: | -[ryzy](https://github.com/ryzy) |[markwhitfeld](https://github.com/markwhitfeld) |[eppsilon](https://github.com/eppsilon) |[sfabriece](https://github.com/sfabriece) |[gkalpak](https://github.com/gkalpak) |[jerryorta-dev](https://github.com/jerryorta-dev) | - -[pgrzeszczak](https://github.com/pgrzeszczak) |[natarajanmca11](https://github.com/natarajanmca11) |[e-oz](https://github.com/e-oz) |[JakePartusch](https://github.com/JakePartusch) |[JayKan](https://github.com/JayKan) |[LuxDie](https://github.com/LuxDie) | -:---: |:---: |:---: |:---: |:---: |:---: | -[pgrzeszczak](https://github.com/pgrzeszczak) |[natarajanmca11](https://github.com/natarajanmca11) |[e-oz](https://github.com/e-oz) |[JakePartusch](https://github.com/JakePartusch) |[JayKan](https://github.com/JayKan) |[LuxDie](https://github.com/LuxDie) | - -[larsthorup](https://github.com/larsthorup) |[ouq77](https://github.com/ouq77) |[irsick](https://github.com/irsick) |[amedinavalencia](https://github.com/amedinavalencia) |[troyanskiy](https://github.com/troyanskiy) |[tsm91](https://github.com/tsm91) | -:---: |:---: |:---: |:---: |:---: |:---: | -[larsthorup](https://github.com/larsthorup) |[ouq77](https://github.com/ouq77) |[irsick](https://github.com/irsick) |[amedinavalencia](https://github.com/amedinavalencia) |[troyanskiy](https://github.com/troyanskiy) |[tsm91](https://github.com/tsm91) | - -[domfarolino](https://github.com/domfarolino) |[juristr](https://github.com/juristr) |[jvitor83](https://github.com/jvitor83) |[JohnCashmore](https://github.com/JohnCashmore) |[turbohappy](https://github.com/turbohappy) |[devanp92](https://github.com/devanp92) | -:---: |:---: |:---: |:---: |:---: |:---: | -[domfarolino](https://github.com/domfarolino) |[juristr](https://github.com/juristr) |[jvitor83](https://github.com/jvitor83) |[JohnCashmore](https://github.com/JohnCashmore) |[turbohappy](https://github.com/turbohappy) |[devanp92](https://github.com/devanp92) | - -[evanplaice](https://github.com/evanplaice) |[hAWKdv](https://github.com/hAWKdv) |[JunaidZA](https://github.com/JunaidZA) |[c-ice](https://github.com/c-ice) |[markharding](https://github.com/markharding) |[ojacquemart](https://github.com/ojacquemart) | -:---: |:---: |:---: |:---: |:---: |:---: | -[evanplaice](https://github.com/evanplaice) |[hAWKdv](https://github.com/hAWKdv) |[JunaidZA](https://github.com/JunaidZA) |[c-ice](https://github.com/c-ice) |[markharding](https://github.com/markharding) |[ojacquemart](https://github.com/ojacquemart) | - -[gotenxds](https://github.com/gotenxds) |[TuiKiken](https://github.com/TuiKiken) |[edud69](https://github.com/edud69) |[karlhaas](https://github.com/karlhaas) |[Yonet](https://github.com/Yonet) |[Green-Cat](https://github.com/Green-Cat) | -:---: |:---: |:---: |:---: |:---: |:---: | -[gotenxds](https://github.com/gotenxds) |[TuiKiken](https://github.com/TuiKiken) |[edud69](https://github.com/edud69) |[karlhaas](https://github.com/karlhaas) |[Yonet](https://github.com/Yonet) |[Green-Cat](https://github.com/Green-Cat) | - -[ip512](https://github.com/ip512) |[Bigous](https://github.com/Bigous) |[tiagomapmarques](https://github.com/tiagomapmarques) |[admosity](https://github.com/admosity) |[alexweber](https://github.com/alexweber) |[allenhwkim](https://github.com/allenhwkim) | -:---: |:---: |:---: |:---: |:---: |:---: | -[ip512](https://github.com/ip512) |[Bigous](https://github.com/Bigous) |[tiagomapmarques](https://github.com/tiagomapmarques) |[admosity](https://github.com/admosity) |[alexweber](https://github.com/alexweber) |[allenhwkim](https://github.com/allenhwkim) | - -[Falinor](https://github.com/Falinor) |[amaltsev](https://github.com/amaltsev) |[yassirh](https://github.com/yassirh) |[taguan](https://github.com/taguan) |[bbarry](https://github.com/bbarry) |[sonicparke](https://github.com/sonicparke) | -:---: |:---: |:---: |:---: |:---: |:---: | -[Falinor](https://github.com/Falinor) |[amaltsev](https://github.com/amaltsev) |[yassirh](https://github.com/yassirh) |[taguan](https://github.com/taguan) |[bbarry](https://github.com/bbarry) |[sonicparke](https://github.com/sonicparke) | - -[brendanbenson](https://github.com/brendanbenson) |[brian428](https://github.com/brian428) |[briantopping](https://github.com/briantopping) |[ckapilla](https://github.com/ckapilla) |[netstart](https://github.com/netstart) |[cadriel](https://github.com/cadriel) | -:---: |:---: |:---: |:---: |:---: |:---: | -[brendanbenson](https://github.com/brendanbenson) |[brian428](https://github.com/brian428) |[briantopping](https://github.com/briantopping) |[ckapilla](https://github.com/ckapilla) |[netstart](https://github.com/netstart) |[cadriel](https://github.com/cadriel) | - -[dszymczuk](https://github.com/dszymczuk) |[dmurat](https://github.com/dmurat) |[peah90](https://github.com/peah90) |[dstockhammer](https://github.com/dstockhammer) |[dwido](https://github.com/dwido) |[totev](https://github.com/totev) | -:---: |:---: |:---: |:---: |:---: |:---: | -[dszymczuk](https://github.com/dszymczuk) |[dmurat](https://github.com/dmurat) |[peah90](https://github.com/peah90) |[dstockhammer](https://github.com/dstockhammer) |[dwido](https://github.com/dwido) |[totev](https://github.com/totev) | - -[nosachamos](https://github.com/nosachamos) |[koodikindral](https://github.com/koodikindral) |[hpinsley](https://github.com/hpinsley) |[NN77](https://github.com/NN77) |[isidroamv](https://github.com/isidroamv) |[jeffbcross](https://github.com/jeffbcross) | -:---: |:---: |:---: |:---: |:---: |:---: | -[nosachamos](https://github.com/nosachamos) |[koodikindral](https://github.com/koodikindral) |[hpinsley](https://github.com/hpinsley) |[NN77](https://github.com/NN77) |[isidroamv](https://github.com/isidroamv) |[jeffbcross](https://github.com/jeffbcross) | - -[Drane](https://github.com/Drane) |[johnjelinek](https://github.com/johnjelinek) |[JunusErgin](https://github.com/JunusErgin) |[justindujardin](https://github.com/justindujardin) |[lihaibh](https://github.com/lihaibh) |[Brooooooklyn](https://github.com/Brooooooklyn) | -:---: |:---: |:---: |:---: |:---: |:---: | -[Drane](https://github.com/Drane) |[johnjelinek](https://github.com/johnjelinek) |[JunusErgin](https://github.com/JunusErgin) |[justindujardin](https://github.com/justindujardin) |[lihaibh](https://github.com/lihaibh) |[Brooooooklyn](https://github.com/Brooooooklyn) | - -[tandu](https://github.com/tandu) |[inkidotcom](https://github.com/inkidotcom) |[Marcelh29](https://github.com/Marcelh29) |[daixtrose](https://github.com/daixtrose) |[MathijsHoogland](https://github.com/MathijsHoogland) |[mjwwit](https://github.com/mjwwit) | -:---: |:---: |:---: |:---: |:---: |:---: | -[tandu](https://github.com/tandu) |[inkidotcom](https://github.com/inkidotcom) |[Marcelh29](https://github.com/Marcelh29) |[daixtrose](https://github.com/daixtrose) |[MathijsHoogland](https://github.com/MathijsHoogland) |[mjwwit](https://github.com/mjwwit) | - -[oferze](https://github.com/oferze) |[ocombe](https://github.com/ocombe) |[gdi2290](https://github.com/gdi2290) |[typekpb](https://github.com/typekpb) |[philipooo](https://github.com/philipooo) |[redian](https://github.com/redian) | -:---: |:---: |:---: |:---: |:---: |:---: | -[oferze](https://github.com/oferze) |[ocombe](https://github.com/ocombe) |[gdi2290](https://github.com/gdi2290) |[typekpb](https://github.com/typekpb) |[philipooo](https://github.com/philipooo) |[redian](https://github.com/redian) | - -[robbatt](https://github.com/robbatt) |[robertpenner](https://github.com/robertpenner) |[Sjiep](https://github.com/Sjiep) |[RoxKilly](https://github.com/RoxKilly) |[sclausen](https://github.com/sclausen) |[heavymery](https://github.com/heavymery) | -:---: |:---: |:---: |:---: |:---: |:---: | -[robbatt](https://github.com/robbatt) |[robertpenner](https://github.com/robertpenner) |[Sjiep](https://github.com/Sjiep) |[RoxKilly](https://github.com/RoxKilly) |[sclausen](https://github.com/sclausen) |[heavymery](https://github.com/heavymery) | - -[tapas4java](https://github.com/tapas4java) |[valera-rozuvan](https://github.com/valera-rozuvan) |[vincentpalita](https://github.com/vincentpalita) |[Yalrafih](https://github.com/Yalrafih) |[billsworld](https://github.com/billsworld) |[blackheart01](https://github.com/blackheart01) | -:---: |:---: |:---: |:---: |:---: |:---: | -[tapas4java](https://github.com/tapas4java) |[valera-rozuvan](https://github.com/valera-rozuvan) |[vincentpalita](https://github.com/vincentpalita) |[Yalrafih](https://github.com/Yalrafih) |[billsworld](https://github.com/billsworld) |[blackheart01](https://github.com/blackheart01) | - -[butterfieldcons](https://github.com/butterfieldcons) |[danielcrisp](https://github.com/danielcrisp) |[jgolla](https://github.com/jgolla) |[omerfarukyilmaz](https://github.com/omerfarukyilmaz) |[pbazurin-softheme](https://github.com/pbazurin-softheme) |[rossedfort](https://github.com/rossedfort) | -:---: |:---: |:---: |:---: |:---: |:---: | -[butterfieldcons](https://github.com/butterfieldcons) |[danielcrisp](https://github.com/danielcrisp) |[jgolla](https://github.com/jgolla) |[omerfarukyilmaz](https://github.com/omerfarukyilmaz) |[pbazurin-softheme](https://github.com/pbazurin-softheme) |[rossedfort](https://github.com/rossedfort) | - -[ruffiem](https://github.com/ruffiem) |[savcha](https://github.com/savcha) |[ultrasonicsoft](https://github.com/ultrasonicsoft) |[nulldev07](https://github.com/nulldev07) | -:---: |:---: |:---: |:---: | -[ruffiem](https://github.com/ruffiem) |[savcha](https://github.com/savcha) |[ultrasonicsoft](https://github.com/ultrasonicsoft) |[nulldev07](https://github.com/nulldev07) | - -## Wiki Contributors - -Here are all the awesome guys who are helping to make the project's wiki even better! - -``` -56 Minko Gechev -35 Clayton K. N. Passos -15 Shyam-Chen -14 Vincent van Proosdij - 8 Christian Dobert - 8 matthew harwood - 8 Robert van Kints - 6 ruffiem - 6 Ludovic HENIN - 5 Attila Egyed - 4 Chris Kapilla - 4 davidgfolch - 3 Brian Kotek - 3 Stefan Schüller - 3 Ezequiel Cicala - 3 Robert Stoll - 3 Patrick Hillert - 2 Dinsitro - 2 Amal Shehu - 2 Brooke Smith - 2 Simon Hampton - 2 Yannick Koehler - 2 Giovanni Candido da Silva - 2 Hank Ehly - 2 hhubik - 2 Cy Klassen - 2 Joshua Wiens - 2 Nathan Walker - 2 valentin - 2 zealitude - 2 Drake Wilson - 1 Adam Johannesmeyer - 1 陳彥澄 - 1 Ameer Nuri - 1 Ankit Kamboj - 1 BouncingBit - 1 Dang Tung - 1 Eddie Sun - 1 Enrico Secondulfo - 1 Eugene Serkin - 1 Frido Koch - 1 Ishara Samantha - 1 Jack Morrissey - 1 Jesper Rønn-Jensen - 1 Myrmex - 1 Pol Stafford - 1 Raphael Schmitt - 1 Sebastian Fuss - 1 Sebastien de Salvador - 1 Simon Altschuler - 1 Sylvain Francois - 1 The Ult - 1 Yonet - 1 ganesansays - 1 gforceg - 1 graham - 1 kiuka - 1 mcchae7 - 1 neridonk - 1 omerfarukyilmaz - 1 samuelfernandez - 1 silicakes - 1 zcsongor -``` - -# Change Log - -You can follow the [Angular change log here](https://github.com/angular/angular/blob/master/CHANGELOG.md). - -# License - -MIT +For starting a new project consider [Angular CLI](https://cli.angular.io). Read more [here](https://github.com/mgechev/angular-seed/issues/2416). diff --git a/README.old.md b/README.old.md new file mode 100644 index 000000000..30e10639d --- /dev/null +++ b/README.old.md @@ -0,0 +1,714 @@ +# Introduction + +[![Angular Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://angular.io/guide/styleguide) +[![Build Status](https://travis-ci.org/mgechev/angular-seed.svg?branch=master)](https://travis-ci.org/mgechev/angular-seed) +[![Build Status](https://ci.appveyor.com/api/projects/status/jg5vg36w0klpa00e/branch/master?svg=true)](https://ci.appveyor.com/project/mgechev/angular2-seed) +[![Join the chat at https://gitter.im/mgechev/angular2-seed](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mgechev/angular2-seed?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Greenkeeper badge](https://badges.greenkeeper.io/mgechev/angular-seed.svg)](https://greenkeeper.io/) +[![Dependency Status](https://david-dm.org/mgechev/angular-seed.svg)](https://david-dm.org/mgechev/angular-seed) + +Provides fast, reliable and extensible starter for the development of Angular projects. + +**Warning: If you're just getting started with the entire JavaScript ecosystem then Angular Seed might not be the best choice for you. The project provides scalable approach for building Angular applications but you may face difficulties configuring this highly customizable solution. In such case we recommend the [Angular CLI](https://github.com/angular/angular-cli).** + +`angular-seed` provides the following features: + +- Allows you to painlessly update the seed tasks of already existing project. +- Supports multiple Angular applications with shared codebase in a single instance of the seed. +- Official Angular i18n support. +- Ready to go, statically typed build system using gulp for working with TypeScript. +- Production and development builds. +- **Ahead-of-Time** compilation support. +- **Tree-Shaking** production builds with Rollup. +- Uses codelyzer for static code analysis, which verifies that the project follows practices from the Angular style guide. +- Sample unit tests with Jasmine and Karma including code coverage via [istanbul](https://gotwarlost.github.io/istanbul/). +- End-to-end tests with Cypress. +- Development server with Livereload. +- Following the [best practices](https://angular.io/guide/styleguide). +- Provides full Docker support for both development and production environment +- Support for Angular Mobile Toolkit +- Allows you to analyze the space usage of created bundles by using source-map-explorer + +# How to start + +**Note** that this seed project requires node >=v6.9.0 or higher and npm >=3.10.3 but in order to be able to take advantage of the complete functionality we **strongly recommend node >=v8.x.x and npm >=5.x.x**. + +In order to start the seed use: + + +```bash +$ git clone --depth 1 https://github.com/mgechev/angular-seed.git +$ cd angular-seed + +# install the project's dependencies +$ npm install +# fast install (via Yarn, https://yarnpkg.com) +$ yarn install # or yarn + +# watches your files and uses livereload by default +$ npm start + +# generate api documentation +$ npm run compodoc +$ npm run serve.compodoc + + +# to start deving with livereload site and coverage as well as continuous testing +$ npm run start.deving + +# dev build +$ npm run build.dev +# prod build, will output the production application in `dist/prod` +# the produced code can be deployed (rsynced) to a remote server +$ npm run build.prod +# prod build using different base path +$ npm run build.prod -- --base "/foo/bar/" + +# dev build of multiple applications (by default the value of --app is "app") +$ npm start -- --app baz +$ npm start -- --app foo +$ npm start -- --app bar +``` +_Does not rely on any global dependencies._ + +**Notes** +- Beware of non-static/side-effectful imports. These cannot be properly optimized. For this reason, even though tree-shaking is taking place the developer still needs to be careful not to include non-static imports that are unnecessary, as those referenced imports will always end up in final bundle. Special attention should be given to RxJs, which makes heavy use of non-static/side-effectful imports: make sure you only [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md). +- UMD modules result in code that cannot be properly optimized. For best results, prefer ES6 modules whenever possible. This includes third-party dependencies: if one is published in both UMD and ES6 modules, go with the ES6 modules version. +- During a production build, CommonJs modules will be automatically converted to ES6 modules. This means you can use them and/or require dependencies that use them without any issues. + +# Internationalization + +Put `i18n` attribute to your html tag to mark it for translation, more information here: https://angular.io/docs/ts/latest/cookbook/i18n.html + +## Create a translation source file + +```bash +# Your translation file will be generated here `dist/locale` +$ npm run i18n +``` + +## Production build with your language + +```bash +# Build prod app with the language file `dist/locale/messages.en.xlf` +$ npm run build.prod -- --lang en +``` + +# Dockerization + +The application provides full Docker support. You can use it for both development and production builds and deployments. + +Please note that prod and dev are built into their own separate image, which can lead to unexpected differences in the +npm dependencies and the state of the sources in the container, if you are not familiar with Docker. See below. + +Please also note that karma tests (`npm test`) are independent from the docker environment. +Even if an angular-seed container is up and running, karma will run in the context of your **local** npm install, +which may differ from that of the container. In fact, the docker containers don't have karma installed at all. + +Cypress tests are however fully supported and recommended to test the app served by either the dev or prod docker containers. + +## Development build and deployment + +The dev image only contains the npm libraries installed, but not the sources. The sources are mounted at runtime, +via a docker shared volume, which allows for the live-reload feature to work. + +To start the container, use: + +```bash +$ docker-compose -f docker-compose.dev.yml up -d # optional: --build, see below +``` + +Now open your browser at http://localhost:5555 + +## Production build and deployment + +The prod image serves the minified app (sources compiles with a minimal set of dependencies), via an Nginx server. +It is self-contained, and can therefore be pushed to a Docker registry to be deployed somewhere else easily. + +To start the container, use: + +```bash +$ docker-compose -f docker-compose.prod.yml up -d # optional: --build, see below +``` + +Now open your browser at http://localhost:5555 + +## Updating dependencies and sources +If you are not already familiar with Docker, please note that for both Dev and Prod docker environments, updates to +npm dependencies will be visible only after re-building the image and restarting a new container from it. + +In Dev environment, this only applies to npm dependencies, since the sources are mounted as a shared directory. +In Prod environment, this applies to any change in the project. + +To force docker-compose to rebuild the image before starting the container, use the --build flag: + +```bash +$ docker-compose -f docker-compose.dev.yml up -d --build +``` + + +# Analyzing the space usage of the app +You can analyze the bundle with [source-map-explorer](https://github.com/danvk/source-map-explorer). +It creates a html chart with a file by default, but output can also be json or tsv. + +Run the following: +```bash +$ npm run sme.prod +# You can specify the output format by passing the `sme-out-format` parameter +$ npm run sme.prod -- --sme-out-format json # or html / tsv +``` + +# Table of Contents + +- [Introduction](#introduction) +- [How to start](#how-to-start) +- [Dockerization](#dockerization) + + [How to build and start the dockerized version of the application](#how-to-build-and-start-the-dockerized-version-of-the-application) + + [Development build and deployment](#development-build-and-deployment) + + [Production build and deployment](#production-build-and-deployment) +- [Analyzing the space usage of the app](#analyzing-the-space-usage-of-the-app) +- [Table of Content](#table-of-content) +- [Configuration](#configuration) +- [Environment Configuration](#environment-configuration) +- [Tools documentation](#tools-documentation) +- [How to extend?](#how-to-extend) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Advanced Seed Option](#advanced-seed-option) +- [Examples](#examples) +- [Directory Structure](#directory-structure) +- [Contributors](#contributors) + - [Wiki Contributors](#wiki-contributors) +- [Change Log](#change-log) +- [License](#license) + +# Configuration + +Default application server configuration + +```js +const PORT = 5555; +const DOCS_PORT = 4003; +const APP_BASE = '/'; +``` + +Configure at runtime + +```bash +$ npm start -- --port 8080 --base /my-app/ +``` + +## Environment configuration + +If you have different environments and you need to configure them to use different end points, settings, etc. you can use the files `dev.ts` or `prod.ts` in`./tools/env/`. The name of the file is environment you want to use. + +The environment can be specified by using: + +```bash +$ npm start -- --env-config ENV_NAME +``` + +Currently the `ENV_NAME`s are `dev`, `prod`, `staging`, but you can simply add a different file `"ENV_NAME.ts".` file in order to alter extra such environments. + +# Tools documentation + +A documentation of the provided tools can be found in [tools/README.md](tools/README.md). + +# How to extend? + +Visit the [Wiki page](https://github.com/mgechev/angular-seed/wiki) of the project. + +# How to update? +``` +git remote add upstream https://github.com/mgechev/angular-seed +git pull upstream master +``` + +# Running tests + +```bash +$ npm test + +# Development. Your app will be watched by karma +# on each change all your specs will be executed. +$ npm run test.watch +# NB: The command above might fail with a "EMFILE: too many open files" error. +# Some OS have a small limit of opened file descriptors (256) by default +# and will result in the EMFILE error. +# You can raise the maximum of file descriptors by running the command below: +$ ulimit -n 10480 + + +# code coverage (istanbul) +# auto-generated at the end of `npm test` +# view coverage report: +$ npm run serve.coverage + +# e2e (aka. end-to-end, integration) - In two different shell windows +$ npm start +$ npm run e2e + +# e2e - In one shell window (especially useful for Continuous Integration) +$ npm run e2e.ci + +# e2e live mode - Using Cypress app - In two different shell windows +$ npm start +$ npm run e2e.live +``` + +# Contributing + +Please see the [CONTRIBUTING](https://github.com/mgechev/angular-seed/blob/master/.github/CONTRIBUTING.md) file for guidelines. + +# Advanced Seed Option + +An [advanced option to this seed exists here](https://github.com/NathanWalker/angular-seed-advanced) which shows examples of how this seed can be expanded to support: + +- [ngrx/store](https://github.com/ngrx/store) RxJS powered state management, inspired by **Redux** +- [ngrx/effects](https://github.com/ngrx/effects) Side effect model for @ngrx/store +- [ngx-translate](https://github.com/ngx-translate/core) for i18n + - Usage is optional but on by default + - Up to you and your team how you want to utilize it. It can be easily removed if not needed. +- [angulartics2](https://github.com/angulartics/angulartics2) Vendor-agnostic analytics for Angular applications. + - Out of box support for [Segment](https://segment.com/) + - When using the seed, be sure to change your `write_key` [here](https://github.com/NathanWalker/angular-seed-advanced/blob/master/src/client/index.html#L24) + - Can be changed to any vendor, [learn more here](https://github.com/angulartics/angulartics2#supported-providers) +- [lodash](https://lodash.com/) Helps reduce blocks of code down to single lines and enhances readability +- [NativeScript](https://www.nativescript.org/) cross platform mobile (w/ native UI) apps. +- [Electron](http://electron.atom.io/) cross platform desktop apps (Mac, Windows and Linux). + +You may use it to learn how to extend this seed for your own use cases. + +# Examples + +Forks of this project demonstrate how to extend and integrate with other libraries: + + - https://github.com/mgechev/switching-to-angular2 - code samples for the book ["Switching to Angular 2"](https://www.packtpub.com/web-development/switching-angular-2). + - https://github.com/DeviantJS/angular2-seed-postcss - Extending PostCSS with precss / cssnext for Sass-like features. + - https://github.com/AngularShowcase/angular2-sample-app - sample Angular application. + - https://github.com/AngularShowcase/ng2-bootstrap-sbadmin - ng2-bootstrap-sbadmin. + - https://github.com/AngularShowcase/angular2-seed-ng2-highcharts - Simple application including a [Highcharts](http://www.highcharts.com) graph. + - https://github.com/tarlepp/angular-sailsjs-boilerplate-frontend-angular2 - Example application for [Sails.js](http://sailsjs.org/) integration. + - https://github.com/ludohenin/ng2-wp-blog - Angular application using Wordpress [JSON-API](http://v2.wp-api.org) backend.. + - https://github.com/AngularShowcase/angular2-seed-example-mashup - Angular application demonstrating the use of [Redux](http://redux.js.org/), [D3](https://github.com/mbostock/d3), [socket io](https://github.com/socketio), [Google Charts](https://developers.google.com/chart/), and [RxJs](https://github.com/Reactive-Extensions/RxJS). + - https://github.com/tiagomapmarques/angular2-seed-phaser/tree/releases - integration with [Phaser](http://phaser.io/). + - https://github.com/vyakymenko/angular-seed-express - integration with [Express](https://expressjs.com/) full-stack development. + - https://github.com/UIUXEngineering/angular2-jspm-typescript-seed - integration with [JSPM](http://jspm.io/). + - http://ngbot.io - a chat bot built with angular-seed. + - [angular-seed-inspinia](https://github.com/DmitriyPotapov/angular-seed-inspinia) - integration with custom design template + - [telerik/kendo-angular-quickstart-seed](https://github.com/telerik/kendo-angular-quickstart-seed) - integration with Kendo UI for Angular + - https://github.com/vyakymenko/angular-lib-starter-pack - sample how to create your library compatible with [Angular Seed](https://github.com/mgechev/angular-seed) with [integration guide](https://github.com/vyakymenko/angular-lib-starter-pack#test-your-library-with-angular-seed-or-angular-seed-express). + +# Directory Structure + +``` +. +├── .docker +│   ├── dist-build.development.dockerfile <- Dockerfile for development environment +│   └── dist-build.production.dockerfile <- Dockerfile for production environment +├── .dockerignore <- ignore file for the docker builds +├── LICENSE +├── README.md +├── appveyor.yml +├── docker-compose.production.yml <- docker-compose file for production environment +├── docker-compose.yml. <- docker-compose file for development environment +├── gulpfile.ts <- configuration of the gulp tasks +├── karma.conf.js <- configuration of the test runner +├── package.json <- dependencies of the project +├── cypress +| ├── fixtures +| | └── example.json +| ├── integration +| | ├── about.component.e2e-spec.ts +| | ├── app.component.e2e-spec.ts +| | └── home.component.e2e-spec.ts +| ├── plugins +| | ├── cy-ts-preprocessor.js +| | └── index.js +| ├── support +| | ├── commands.js +| | └── index.js +| └── tsconfig.json +├── src +│   ├── client +│   │   ├── app +│   │   │   ├── about +│   │   │   │   ├── about-routing.module.ts +│   │   │   │   ├── about.component.css +│   │   │   │   ├── about.component.html +│   │   │   │   ├── about.component.spec.ts +│   │   │   │   ├── about.component.ts +│   │   │   │   └── about.module.ts +│   │   │   ├── app-routing.module.ts +│   │   │   ├── app.component.css +│   │   │   ├── app.component.html +│   │   │   ├── app.component.spec.ts +│   │   │   ├── app.component.ts +│   │   │   ├── app.module.ts +│   │   │   ├── home +│   │   │   │   ├── home-routing.module.ts +│   │   │   │   ├── home.component.css +│   │   │   │   ├── home.component.html +│   │   │   │   ├── home.component.spec.ts +│   │   │   │   ├── home.component.ts +│   │   │   │   └── home.module.ts +│   │   │   ├── i18n.providers.ts +│   │   │   ├── main-prod.ts +│   │   │   ├── main.ts +│   │   │   └── shared +│   │   │   ├── config +│   │   │   │   └── env.config.ts +│   │   │   ├── name-list +│   │   │   │   ├── name-list.service.spec.ts +│   │   │   │   └── name-list.service.ts +│   │   │   ├── navbar +│   │   │   │   ├── navbar.component.css +│   │   │   │   ├── navbar.component.html +│   │   │   │   └── navbar.component.ts +│   │   │   ├── shared.module.ts +│   │   │   └── toolbar +│   │   │   ├── toolbar.component.css +│   │   │   ├── toolbar.component.html +│   │   │   └── toolbar.component.ts +│   │   ├── assets +│   │   │   ├── data.json +│   │   │   ├── favicon +│   │   │   │   ├── favicon-DEV.ico +│   │   │   │   └── favicon-PROD.ico +│   │   │   └── svg +│   │   │   └── more.svg +│   │   ├── css +│   │   │   └── main.css +│   │   ├── index.html +│   │   ├── ngsw-config.json +│   │   ├── system-config.ts +│   │   └── tsconfig.json +├── test-config.js <- testing configuration +├── test-main.js <- karma test launcher +├── tools +│   ├── README.md <- build documentation +│   ├── config +│   │   ├── banner-256.txt +│   │   ├── banner.txt +│   │   ├── project.config.ts <- configuration of the specific project +│   │   ├── project.tasks.json <- override composite gulp tasks +│   │   ├── seed.config.ts <- generic configuration of the seed project +│   │   ├── seed.config.interfaces.ts +│   │   ├── seed.tasks.json <- default composite gulp tasks +│   │   └── seed.tslint.json <- generic tslint configuration of the seed project +│   ├── config.ts <- exported configuration (merge both seed.config and project.config, project.config overrides seed.config) +│   ├── debug.ts +│   ├── env <- environment configuration +│   │   ├── base.ts +│   │   ├── dev.ts +│   │   ├── env-config.interface.ts +│   │   └── prod.ts +│   ├── manual_typings +│   │   ├── project <- manual ambient typings for the project +│   │   │   └── sample.package.d.ts +│   │   └── seed <- seed manual ambient typings +│   │   ├── autoprefixer.d.ts +│   │   ├── cssnano.d.ts +│   │   ├── express-history-api-fallback.d.ts +│   │   ├── istream.d.ts +│   │   ├── karma.d.ts +│   │   ├── merge-stream.d.ts +│   │   ├── open.d.ts +│   │   ├── slash.d.ts +│   │   ├── systemjs-builder.d.ts +│   │   └── tildify.d.ts +│   ├── tasks <- gulp tasks +│   │   ├── assets_task.ts +│   │   ├── css_task.ts +│   │   ├── project <- project specific gulp tasks +│   │   │   └── sample.task.ts +│   │   └── seed <- seed generic gulp tasks. They can be overriden by the project specific gulp tasks +│   │   │   ├── build.assets.dev.ts +│   │   │   ├── build.assets.prod.ts +│   │   │   ├── build.bundles.app.rollup.aot.ts +│   │   │   ├── build.bundles.ts +│   │   │   ├── build.docs.ts +│   │   │   ├── build.html_css.ts +│   │   │   ├── build.index.dev.ts +│   │   │   ├── build.index.prod.ts +│   │   │   ├── build.js.dev.ts +│   │   │   ├── build.js.prod.rollup.aot.ts +│   │   │   ├── build.js.test.ts +│   │   │   ├── build.sme.prod.aot.ts +│   │   │   ├── build.sme.prod.rollup.aot.ts +│   │   │   ├── build.sme.prod.ts +│   │   │   ├── build.tools.ts +│   │   │   ├── check.tools.ts +│   │   │   ├── check.versions.ts +│   │   │   ├── clean.all.ts +│   │   │   ├── clean.coverage.ts +│   │   │   ├── clean.dev.ts +│   │   │   ├── clean.prod.ts +│   │   │   ├── clean.sme.ts +│   │   │   ├── clean.tools.ts +│   │   │   ├── clear.files.ts +│   │   │   ├── compile.ahead.prod.ts +│   │   │   ├── copy.prod.rollup.aot.ts +│   │   │   ├── copy.prod.ts +│   │   │   ├── e2e.ts +│   │   │   ├── generate.manifest.ts +│   │   │   ├── i18n.build.ts +│   │   │   ├── i18n.merge.ts +│   │   │   ├── karma.run.ts +│   │   │   ├── karma.run.with_coverage.ts +│   │   │   ├── karma.run.without_coverage.ts +│   │   │   ├── karma.watch.ts +│   │   │   ├── minify.bundles.ts +│   │   │   ├── minify.index.ts +│   │   │   ├── noop.ts +│   │   │   ├── print.banner.ts +│   │   │   ├── serve.coverage.ts +│   │   │   ├── serve.coverage.watch.ts +│   │   │   ├── serve.docs.ts +│   │   │   ├── server.prod.ts +│   │   │   ├── server.start.ts +│   │   │   ├── start.deving.ts +│   │   │   ├── sw.manifest.static.ts +│   │   │   ├── test.watch.ts +│   │   │   ├── transpile.bundles.rollup.aot.ts +│   │   │   ├── tslint.ts +│   │   │   ├── watch.dev.ts +│   │   │   └── watch.test.ts +│   │   ├── task.ts +│   │   └── typescript_task.ts +│   ├── utils <- build utils +│   │   ├── project <- project specific gulp utils +│   │   │   └── sample_util.ts +│   │   ├── project.utils.ts +│   │   ├── seed <- seed specific gulp utils +│   │   │   ├── build_optimizer.ts +│   │   │   ├── clean.ts +│   │   │   ├── code_change_tools.ts +│   │   │   ├── karma.start.ts +│   │   │   ├── server.ts +│   │   │   ├── sme.ts +│   │   │   ├── tasks_tools.ts +│   │   │   ├── template_locals.ts +│   │   │   ├── tsproject.ts +│   │   │   └── watch.ts +│   │   └── seed.utils.ts +│   └── utils.ts +├── tsconfig.json <- configuration of the typescript project (ts-node, which runs the tasks defined in gulpfile.ts) +├── tslint.json <- tslint configuration +└── yarn.lock +``` + +# Contributors + +[mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[greenkeeper[bot]](https://github.com/apps/greenkeeper) |[d3viant0ne](https://github.com/d3viant0ne) |[Shyam-Chen](https://github.com/Shyam-Chen) |[vyakymenko](https://github.com/vyakymenko) | +:---: |:---: |:---: |:---: |:---: |:---: | +[mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[greenkeeper[bot]](https://github.com/apps/greenkeeper) |[d3viant0ne](https://github.com/d3viant0ne) |[Shyam-Chen](https://github.com/Shyam-Chen) |[vyakymenko](https://github.com/vyakymenko) | + +[karlhaas](https://github.com/karlhaas) |[tarlepp](https://github.com/tarlepp) |[Nightapes](https://github.com/Nightapes) |[robstoll](https://github.com/robstoll) |[TheDonDope](https://github.com/TheDonDope) |[NathanWalker](https://github.com/NathanWalker) | +:---: |:---: |:---: |:---: |:---: |:---: | +[karlhaas](https://github.com/karlhaas) |[tarlepp](https://github.com/tarlepp) |[Nightapes](https://github.com/Nightapes) |[robstoll](https://github.com/robstoll) |[TheDonDope](https://github.com/TheDonDope) |[NathanWalker](https://github.com/NathanWalker) | + +[hankehly](https://github.com/hankehly) |[salemdar](https://github.com/salemdar) |[nareshbhatia](https://github.com/nareshbhatia) |[kiuka](https://github.com/kiuka) |[fr-esco](https://github.com/fr-esco) |[jesperronn](https://github.com/jesperronn) | +:---: |:---: |:---: |:---: |:---: |:---: | +[hankehly](https://github.com/hankehly) |[salemdar](https://github.com/salemdar) |[nareshbhatia](https://github.com/nareshbhatia) |[kiuka](https://github.com/kiuka) |[fr-esco](https://github.com/fr-esco) |[jesperronn](https://github.com/jesperronn) | + +[daniru](https://github.com/daniru) |[patrickmichalina](https://github.com/patrickmichalina) |[ArnaudPel](https://github.com/ArnaudPel) |[nhutcorp](https://github.com/nhutcorp) |[netstart](https://github.com/netstart) |[sasikumardr](https://github.com/sasikumardr) | +:---: |:---: |:---: |:---: |:---: |:---: | +[daniru](https://github.com/daniru) |[patrickmichalina](https://github.com/patrickmichalina) |[ArnaudPel](https://github.com/ArnaudPel) |[nhutcorp](https://github.com/nhutcorp) |[netstart](https://github.com/netstart) |[sasikumardr](https://github.com/sasikumardr) | + +[aboeglin](https://github.com/aboeglin) |[eppsilon](https://github.com/eppsilon) |[ashishmondal](https://github.com/ashishmondal) |[sfabriece](https://github.com/sfabriece) |[gkalpak](https://github.com/gkalpak) |[ryzy](https://github.com/ryzy) | +:---: |:---: |:---: |:---: |:---: |:---: | +[aboeglin](https://github.com/aboeglin) |[eppsilon](https://github.com/eppsilon) |[ashishmondal](https://github.com/ashishmondal) |[sfabriece](https://github.com/sfabriece) |[gkalpak](https://github.com/gkalpak) |[ryzy](https://github.com/ryzy) | + +[markwhitfeld](https://github.com/markwhitfeld) |[Karasuni](https://github.com/Karasuni) |[nosachamos](https://github.com/nosachamos) |[jerryorta-dev](https://github.com/jerryorta-dev) |[pgrzeszczak](https://github.com/pgrzeszczak) |[treyrich](https://github.com/treyrich) | +:---: |:---: |:---: |:---: |:---: |:---: | +[markwhitfeld](https://github.com/markwhitfeld) |[Karasuni](https://github.com/Karasuni) |[nosachamos](https://github.com/nosachamos) |[jerryorta-dev](https://github.com/jerryorta-dev) |[pgrzeszczak](https://github.com/pgrzeszczak) |[treyrich](https://github.com/treyrich) | + +[natarajanmca11](https://github.com/natarajanmca11) |[e-oz](https://github.com/e-oz) |[troyanskiy](https://github.com/troyanskiy) |[admosity](https://github.com/admosity) |[alllx](https://github.com/alllx) |[ArminZol](https://github.com/ArminZol) | +:---: |:---: |:---: |:---: |:---: |:---: | +[natarajanmca11](https://github.com/natarajanmca11) |[e-oz](https://github.com/e-oz) |[troyanskiy](https://github.com/troyanskiy) |[admosity](https://github.com/admosity) |[alllx](https://github.com/alllx) |[ArminZol](https://github.com/ArminZol) | + +[LuxDie](https://github.com/LuxDie) |[JakePartusch](https://github.com/JakePartusch) |[JayKan](https://github.com/JayKan) |[JohnCashmore](https://github.com/JohnCashmore) |[larsthorup](https://github.com/larsthorup) |[ouq77](https://github.com/ouq77) | +:---: |:---: |:---: |:---: |:---: |:---: | +[LuxDie](https://github.com/LuxDie) |[JakePartusch](https://github.com/JakePartusch) |[JayKan](https://github.com/JayKan) |[JohnCashmore](https://github.com/JohnCashmore) |[larsthorup](https://github.com/larsthorup) |[ouq77](https://github.com/ouq77) | + +[Doehl](https://github.com/Doehl) |[RomaDotDev](https://github.com/RomaDotDev) |[StefanKoenen](https://github.com/StefanKoenen) |[amedinavalencia](https://github.com/amedinavalencia) |[odk211](https://github.com/odk211) |[tsm91](https://github.com/tsm91) | +:---: |:---: |:---: |:---: |:---: |:---: | +[Doehl](https://github.com/Doehl) |[RomaDotDev](https://github.com/RomaDotDev) |[StefanKoenen](https://github.com/StefanKoenen) |[amedinavalencia](https://github.com/amedinavalencia) |[odk211](https://github.com/odk211) |[tsm91](https://github.com/tsm91) | + +[domfarolino](https://github.com/domfarolino) |[juristr](https://github.com/juristr) |[jvitor83](https://github.com/jvitor83) |[ahmadqarshi](https://github.com/ahmadqarshi) |[turbohappy](https://github.com/turbohappy) |[gotenxds](https://github.com/gotenxds) | +:---: |:---: |:---: |:---: |:---: |:---: | +[domfarolino](https://github.com/domfarolino) |[juristr](https://github.com/juristr) |[jvitor83](https://github.com/jvitor83) |[ahmadqarshi](https://github.com/ahmadqarshi) |[turbohappy](https://github.com/turbohappy) |[gotenxds](https://github.com/gotenxds) | + +[devanp92](https://github.com/devanp92) |[DmitriyPotapov](https://github.com/DmitriyPotapov) |[fisenkodv](https://github.com/fisenkodv) |[emilio-simoes](https://github.com/emilio-simoes) |[evanplaice](https://github.com/evanplaice) |[JunaidZA](https://github.com/JunaidZA) | +:---: |:---: |:---: |:---: |:---: |:---: | +[devanp92](https://github.com/devanp92) |[DmitriyPotapov](https://github.com/DmitriyPotapov) |[fisenkodv](https://github.com/fisenkodv) |[emilio-simoes](https://github.com/emilio-simoes) |[evanplaice](https://github.com/evanplaice) |[JunaidZA](https://github.com/JunaidZA) | + +[c-ice](https://github.com/c-ice) |[markharding](https://github.com/markharding) |[maxmarkus](https://github.com/maxmarkus) |[ojacquemart](https://github.com/ojacquemart) |[rafaelss95](https://github.com/rafaelss95) |[rajeev-tripathi](https://github.com/rajeev-tripathi) | +:---: |:---: |:---: |:---: |:---: |:---: | +[c-ice](https://github.com/c-ice) |[markharding](https://github.com/markharding) |[maxmarkus](https://github.com/maxmarkus) |[ojacquemart](https://github.com/ojacquemart) |[rafaelss95](https://github.com/rafaelss95) |[rajeev-tripathi](https://github.com/rajeev-tripathi) | + +[TuiKiken](https://github.com/TuiKiken) |[vogloblinsky](https://github.com/vogloblinsky) |[edud69](https://github.com/edud69) |[idready](https://github.com/idready) |[zbarbuto](https://github.com/zbarbuto) |[Yonet](https://github.com/Yonet) | +:---: |:---: |:---: |:---: |:---: |:---: | +[TuiKiken](https://github.com/TuiKiken) |[vogloblinsky](https://github.com/vogloblinsky) |[edud69](https://github.com/edud69) |[idready](https://github.com/idready) |[zbarbuto](https://github.com/zbarbuto) |[Yonet](https://github.com/Yonet) | + +[Green-Cat](https://github.com/Green-Cat) |[ip512](https://github.com/ip512) |[joshboley](https://github.com/joshboley) |[Marcelh1983](https://github.com/Marcelh1983) |[pbazurin-softheme](https://github.com/pbazurin-softheme) |[Bigous](https://github.com/Bigous) | +:---: |:---: |:---: |:---: |:---: |:---: | +[Green-Cat](https://github.com/Green-Cat) |[ip512](https://github.com/ip512) |[joshboley](https://github.com/joshboley) |[Marcelh1983](https://github.com/Marcelh1983) |[pbazurin-softheme](https://github.com/pbazurin-softheme) |[Bigous](https://github.com/Bigous) | + +[aamir1995](https://github.com/aamir1995) |[alexweber](https://github.com/alexweber) |[allenhwkim](https://github.com/allenhwkim) |[hellofornow](https://github.com/hellofornow) |[Falinor](https://github.com/Falinor) |[amaltsev](https://github.com/amaltsev) | +:---: |:---: |:---: |:---: |:---: |:---: | +[aamir1995](https://github.com/aamir1995) |[alexweber](https://github.com/alexweber) |[allenhwkim](https://github.com/allenhwkim) |[hellofornow](https://github.com/hellofornow) |[Falinor](https://github.com/Falinor) |[amaltsev](https://github.com/amaltsev) | + +[tomlobato](https://github.com/tomlobato) |[taguan](https://github.com/taguan) |[bbarry](https://github.com/bbarry) |[bbogdanov](https://github.com/bbogdanov) |[sonicparke](https://github.com/sonicparke) |[brendanbenson](https://github.com/brendanbenson) | +:---: |:---: |:---: |:---: |:---: |:---: | +[tomlobato](https://github.com/tomlobato) |[taguan](https://github.com/taguan) |[bbarry](https://github.com/bbarry) |[bbogdanov](https://github.com/bbogdanov) |[sonicparke](https://github.com/sonicparke) |[brendanbenson](https://github.com/brendanbenson) | + +[brian428](https://github.com/brian428) |[briantopping](https://github.com/briantopping) |[ckapilla](https://github.com/ckapilla) |[cadriel](https://github.com/cadriel) |[Cselt](https://github.com/Cselt) |[dszymczuk](https://github.com/dszymczuk) | +:---: |:---: |:---: |:---: |:---: |:---: | +[brian428](https://github.com/brian428) |[briantopping](https://github.com/briantopping) |[ckapilla](https://github.com/ckapilla) |[cadriel](https://github.com/cadriel) |[Cselt](https://github.com/Cselt) |[dszymczuk](https://github.com/dszymczuk) | + +[dmurat](https://github.com/dmurat) |[peah90](https://github.com/peah90) |[dstockhammer](https://github.com/dstockhammer) |[DaveSkender](https://github.com/DaveSkender) |[dwido](https://github.com/dwido) |[kayveedw](https://github.com/kayveedw) | +:---: |:---: |:---: |:---: |:---: |:---: | +[dmurat](https://github.com/dmurat) |[peah90](https://github.com/peah90) |[dstockhammer](https://github.com/dstockhammer) |[DaveSkender](https://github.com/DaveSkender) |[dwido](https://github.com/dwido) |[kayveedw](https://github.com/kayveedw) | + +[totev](https://github.com/totev) |[doron-nathan-epstein](https://github.com/doron-nathan-epstein) |[ericdoerheit](https://github.com/ericdoerheit) |[gp187](https://github.com/gp187) |[gsamokovarov](https://github.com/gsamokovarov) |[koodikindral](https://github.com/koodikindral) | +:---: |:---: |:---: |:---: |:---: |:---: | +[totev](https://github.com/totev) |[doron-nathan-epstein](https://github.com/doron-nathan-epstein) |[ericdoerheit](https://github.com/ericdoerheit) |[gp187](https://github.com/gp187) |[gsamokovarov](https://github.com/gsamokovarov) |[koodikindral](https://github.com/koodikindral) | + +[hkashlan](https://github.com/hkashlan) |[hpinsley](https://github.com/hpinsley) |[NN77](https://github.com/NN77) |[isidroamv](https://github.com/isidroamv) |[aelbore](https://github.com/aelbore) |[JohnnyQQQQ](https://github.com/JohnnyQQQQ) | +:---: |:---: |:---: |:---: |:---: |:---: | +[hkashlan](https://github.com/hkashlan) |[hpinsley](https://github.com/hpinsley) |[NN77](https://github.com/NN77) |[isidroamv](https://github.com/isidroamv) |[aelbore](https://github.com/aelbore) |[JohnnyQQQQ](https://github.com/JohnnyQQQQ) | + +[jeffbcross](https://github.com/jeffbcross) |[Drane](https://github.com/Drane) |[johnjelinek](https://github.com/johnjelinek) |[JunusErgin](https://github.com/JunusErgin) |[justindujardin](https://github.com/justindujardin) |[karlhiramoto](https://github.com/karlhiramoto) | +:---: |:---: |:---: |:---: |:---: |:---: | +[jeffbcross](https://github.com/jeffbcross) |[Drane](https://github.com/Drane) |[johnjelinek](https://github.com/johnjelinek) |[JunusErgin](https://github.com/JunusErgin) |[justindujardin](https://github.com/justindujardin) |[karlhiramoto](https://github.com/karlhiramoto) | + +[lihaibh](https://github.com/lihaibh) |[Brooooooklyn](https://github.com/Brooooooklyn) |[tandu](https://github.com/tandu) |[inkidotcom](https://github.com/inkidotcom) |[mpetkov](https://github.com/mpetkov) |[daixtrose](https://github.com/daixtrose) | +:---: |:---: |:---: |:---: |:---: |:---: | +[lihaibh](https://github.com/lihaibh) |[Brooooooklyn](https://github.com/Brooooooklyn) |[tandu](https://github.com/tandu) |[inkidotcom](https://github.com/inkidotcom) |[mpetkov](https://github.com/mpetkov) |[daixtrose](https://github.com/daixtrose) | + +[maxklenk](https://github.com/maxklenk) |[mjwwit](https://github.com/mjwwit) |[oferze](https://github.com/oferze) |[ocombe](https://github.com/ocombe) |[PatrickJS](https://github.com/PatrickJS) |[typekpb](https://github.com/typekpb) | +:---: |:---: |:---: |:---: |:---: |:---: | +[maxklenk](https://github.com/maxklenk) |[mjwwit](https://github.com/mjwwit) |[oferze](https://github.com/oferze) |[ocombe](https://github.com/ocombe) |[PatrickJS](https://github.com/PatrickJS) |[typekpb](https://github.com/typekpb) | + +[pavlovich](https://github.com/pavlovich) |[philipooo](https://github.com/philipooo) |[TTy32](https://github.com/TTy32) |[redian](https://github.com/redian) |[robbatt](https://github.com/robbatt) |[robertpenner](https://github.com/robertpenner) | +:---: |:---: |:---: |:---: |:---: |:---: | +[pavlovich](https://github.com/pavlovich) |[philipooo](https://github.com/philipooo) |[TTy32](https://github.com/TTy32) |[redian](https://github.com/redian) |[robbatt](https://github.com/robbatt) |[robertpenner](https://github.com/robertpenner) | + +[Sjiep](https://github.com/Sjiep) |[RoxKilly](https://github.com/RoxKilly) |[SamVerschueren](https://github.com/SamVerschueren) |[sclausen](https://github.com/sclausen) |[heavymery](https://github.com/heavymery) |[na-oma](https://github.com/na-oma) | +:---: |:---: |:---: |:---: |:---: |:---: | +[Sjiep](https://github.com/Sjiep) |[RoxKilly](https://github.com/RoxKilly) |[SamVerschueren](https://github.com/SamVerschueren) |[sclausen](https://github.com/sclausen) |[heavymery](https://github.com/heavymery) |[na-oma](https://github.com/na-oma) | + +[tapas4java](https://github.com/tapas4java) |[tsvetomir](https://github.com/tsvetomir) |[valera-rozuvan](https://github.com/valera-rozuvan) |[vincentpalita](https://github.com/vincentpalita) |[VladimirMakaev](https://github.com/VladimirMakaev) |[Yalrafih](https://github.com/Yalrafih) | +:---: |:---: |:---: |:---: |:---: |:---: | +[tapas4java](https://github.com/tapas4java) |[tsvetomir](https://github.com/tsvetomir) |[valera-rozuvan](https://github.com/valera-rozuvan) |[vincentpalita](https://github.com/vincentpalita) |[VladimirMakaev](https://github.com/VladimirMakaev) |[Yalrafih](https://github.com/Yalrafih) | + +[arioth](https://github.com/arioth) |[billsworld](https://github.com/billsworld) |[blackheart01](https://github.com/blackheart01) |[butterfieldcons](https://github.com/butterfieldcons) |[danielcrisp](https://github.com/danielcrisp) |[gforceg](https://github.com/gforceg) | +:---: |:---: |:---: |:---: |:---: |:---: | +[arioth](https://github.com/arioth) |[billsworld](https://github.com/billsworld) |[blackheart01](https://github.com/blackheart01) |[butterfieldcons](https://github.com/butterfieldcons) |[danielcrisp](https://github.com/danielcrisp) |[gforceg](https://github.com/gforceg) | + +[jgolla](https://github.com/jgolla) |[locinus](https://github.com/locinus) |[omerfarukyilmaz](https://github.com/omerfarukyilmaz) |[ZuSe](https://github.com/ZuSe) |[ruffiem](https://github.com/ruffiem) |[savcha](https://github.com/savcha) | +:---: |:---: |:---: |:---: |:---: |:---: | +[jgolla](https://github.com/jgolla) |[locinus](https://github.com/locinus) |[omerfarukyilmaz](https://github.com/omerfarukyilmaz) |[ZuSe](https://github.com/ZuSe) |[ruffiem](https://github.com/ruffiem) |[savcha](https://github.com/savcha) | + +[tobiaseisenschenk](https://github.com/tobiaseisenschenk) |[ultrasonicsoft](https://github.com/ultrasonicsoft) |[yassirh](https://github.com/yassirh) | +:---: |:---: |:---: | +[tobiaseisenschenk](https://github.com/tobiaseisenschenk) |[ultrasonicsoft](https://github.com/ultrasonicsoft) |[yassirh](https://github.com/yassirh) | + +## Wiki Contributors + +Here are all the awesome guys who are helping to make the project's wiki even better! + +``` +60 Minko Gechev +35 Clayton K. N. Passos +15 Shyam-Chen +14 Vincent van Proosdij + 8 Robert van Kints + 8 matthew harwood + 8 Christian Dobert + 7 Neo Minchul Chae + 6 Ludovic HENIN + 6 ruffiem + 5 Attila Egyed + 5 hhubik + 4 Chris Kapilla + 4 davidgfolch + 4 gforceg + 4 Brian Kotek + 3 Ezequiel Cicala + 3 Stefan Schüller + 3 Kirill Zdornyy + 3 Patrick Hillert + 3 Robert Stoll + 2 Dinsitro + 2 Brooke Smith + 2 Joshua Wiens + 2 Daniele Zurico + 2 Amal Shehu + 2 Cy Klassen + 2 Nathan Walker + 2 Simon Hampton + 2 omerfarukyilmaz + 2 Hank Ehly + 2 zealitude + 2 Paul Davis + 2 valentin + 2 Giovanni Candido da Silva + 2 Drake Wilson + 2 Yannick Koehler + 1 jovermier + 1 kiuka + 1 mcchae7 + 1 neridonk + 1 samuelfernandez + 1 silicakes + 1 zcsongor + 1 Adam Johannesmeyer + 1 陳彥澄 + 1 Alexander Yamkov + 1 Ameer Nuri + 1 Ankit Kamboj + 1 BouncingBit + 1 Charlie Hua + 1 Dang Tung + 1 EBIA + 1 Eddie Sun + 1 Enrico Secondulfo + 1 Eugene Serkin + 1 Fede Guzmán + 1 Frido Koch + 1 Ishara Samantha + 1 Jack Morrissey + 1 Jesper Rønn-Jensen + 1 José Rebelo + 1 Karasu + 1 Marc-André Barbeau + 1 Mathias Døhl + 1 Myrmex + 1 Pol Stafford + 1 Raphael Schmitt + 1 Sebastian Fuss + 1 Sebastien de Salvador + 1 Shyam Chen + 1 Simon Altschuler + 1 Sylvain Francois + 1 The Ult + 1 Valentyn Yakymenko + 1 Vivin Antony + 1 Yen-cheng Chen, 陳彥澄 + 1 Yonet + 1 Zakhar Gulchak + 1 ganesansays + 1 geo101 + 1 graham +``` + +# Change Log + +You can follow the [Angular change log here](https://github.com/angular/angular/blob/master/CHANGELOG.md). + +# License + +MIT diff --git a/appveyor.yml b/appveyor.yml index 578724bce..ca5e97f9c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,9 +19,8 @@ init: install: - ps: Install-Product node $env:nodejs_version - - npm install -g npm@3.10.8 - ps: $env:path = $env:appdata + "\npm;" + $env:path - - npm install && npm install karma-ie-launcher + - npm ci && npm install karma-ie-launcher test_script: # Output useful info for debugging. @@ -29,7 +28,7 @@ test_script: # We test multiple Windows shells because of prior stdout buffering issues # filed against Grunt. https://github.com/joyent/node/issues/3584 - ps: "npm --version # PowerShell" # Pass comment to PS for easier debugging - - npm run tests.all && npm run build.prod.exp + - npm run tests.all notifications: - provider: Webhook @@ -38,4 +37,5 @@ notifications: on_build_failure: true on_build_status_changed: true -cache: node_modules -> package.json +cache: + - '%APPDATA%\npm-cache' diff --git a/cypress.json b/cypress.json new file mode 100644 index 000000000..4c2c7b973 --- /dev/null +++ b/cypress.json @@ -0,0 +1,4 @@ +{ + "baseUrl": "http://localhost:5555", + "video": false +} diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 000000000..da18d9352 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} \ No newline at end of file diff --git a/cypress/integration/about.component.e2e-spec.ts b/cypress/integration/about.component.e2e-spec.ts new file mode 100644 index 000000000..784264ebd --- /dev/null +++ b/cypress/integration/about.component.e2e-spec.ts @@ -0,0 +1,13 @@ +describe('About', () => { + + it('should have correct feature heading', () => { + cy.visit('/about'); + cy.get('sd-about h2').should('have.text', 'Features'); + }); + + it('should use our custom cypress command', () => { + cy.visitAbout(); + cy.get('sd-about h2').should('have.text', 'Features'); + }); + +}); diff --git a/cypress/integration/app.component.e2e-spec.ts b/cypress/integration/app.component.e2e-spec.ts new file mode 100644 index 000000000..55f595d2f --- /dev/null +++ b/cypress/integration/app.component.e2e-spec.ts @@ -0,0 +1,23 @@ +describe('App', () => { + + beforeEach(() => { + cy.visit('/'); + }); + + it('should have a title', () => { + cy.title().should('be.equal', 'Welcome to angular-seed!'); + }); + + it('should have