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/nginx.conf b/.docker/nginx.conf new file mode 100644 index 000000000..d0a6e487d --- /dev/null +++ b/.docker/nginx.conf @@ -0,0 +1,38 @@ +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + +server { + + listen ${NGINX_PORT}; + + server_name ${NGINX_HOST}; + # ssl on; + # ssl_certificate angular-seed_server.crt; + # ssl_certificate_key angular-seed_server.pem; + # + # ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; + # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + # ssl_prefer_server_ciphers on; + # ssl_session_cache shared:SSL:10m; + # ssl_session_tickets off; # Requires nginx >= 1.5.9 + # add_header Strict-Transport-Security "max-age=63072000; preload"; + # add_header X-Frame-Options DENY; + # + # location /api/microservice1 { + # rewrite ^/api/microservice1/(.*)$ /$1 break; + # proxy_pass https://microservice1/; + # proxy_http_version 1.1; + # proxy_set_header X-Forwarded-For $remote_addr; + # } + + location / { + root /var/www/dist/prod; + try_files $uri /index.html; + index index.html; + gzip on; + gzip_types text/css text/javascript application/x-javascript application/json; + } + +} 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 new file mode 100644 index 000000000..f6a454d57 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,39 @@ +# compiled output +dist +tmp +sme + +# dependencies +node_modules +bower_components + +# IDEs and editors +.idea +.vscode +.project +.classpath +*.launch +.settings/ +.editorconfig + +# misc +.sass-cache +connect.lock +coverage/* +coverage_js/* +libpeerconnection.log +npm-debug.log +testem.log +typings + +# test +*.spec.ts +e2e/*.js +e2e/*.map +test-config.js +test-main.js +karma.conf.js + +#System Files +.DS_Store +Thumbs.db diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..f1cc3ad32 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..9fd334260 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,15 @@ +## Submitting Pull Requests + +**Please follow these basic steps to simplify pull request reviews - if you don't you'll probably just be asked to anyway.** + +* Please rebase your branch against the current master +* Run ```npm install``` to make sure your development dependencies are up-to-date +* Please ensure that the test suite passes **and** that code is lint free before submitting a PR by running: + * ```npm test``` +* If you've added new functionality, **please** include tests which validate its behaviour +* Make reference to possible [issues](https://github.com/mgechev/angular2-seed/issues) on PR comment + +## Submitting bug reports + +* Please detail the affected browser(s) and operating system(s) +* Please be sure to state which version of node **and** npm you're using diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..cd19aeff3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + + +**I'm submitting a ...** (check one with "x") +``` +[ ] bug report => search github for a similar issue or PR before submitting +[ ] feature request +[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2) +``` + +**Current behavior** + + +**Expected behavior** + + +**Minimal reproduction of the problem with instructions** + + +**What is the motivation / use case for changing the behavior?** + + +**Please tell us about your environment:** + + +* **Angular Seed Version:** `aaaaf75` + + +* **Node:** `node --version` = diff --git a/.gitignore b/.gitignore index 0eb132d6e..b311be517 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,13 @@ lib-cov # Coverage directory used by tools like istanbul coverage +coverage_js + +# Directory for source-map-explorer reports +sme + +# ignore documentation +documentation # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt @@ -23,10 +30,35 @@ build/Release # Commenting this out is preferred by some people, see # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- node_modules +typings +ts-node # Users Environment Variables .lock-wscript +.tsdrc +.typingsrc + +#IDE configuration files +.idea +*.iml +/tools/**/*.js dist dev +docs lib +test +tmp +cypress/videos + +gulpfile.js +gulpfile.js.map + +# OS X trash files +.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 new file mode 100644 index 000000000..3d307d09f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,47 @@ +language: node_js +node_js: stable + +sudo: false + +install: true # yarn bug + +addons: + firefox: latest + chrome: stable + +os: + - linux +# - osx + +before_install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated xctool || brew upgrade xctool; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi # Karma CI + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install google-chrome; fi # Karma CI + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi + +before_script: + - npm ci + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi + + +after_failure: + - cat /home/travis/build/mgechev/angular-seed/npm-debug.log + +branches: + only: master + +notifications: + email: true + webhooks: + urls: https://webhooks.gitter.im/e/565e4b2fed3b96c1b964 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always + +cache: + directories: + - "$HOME/.npm" + +script: + - npm run tests.all diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..951fefa9f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Chrome against localhost, with sourcemaps", + "type": "chrome", + "preLaunchTask": "start", + "request": "launch", + "url": "http://localhost:5555", + "sourceMaps": true, + "webRoot": "${workspaceRoot}/src/client", + "sourceMapPathOverrides": { + "app/*": "${webRoot}/app/*" + } + }, + { + "name": "Attach to Chrome, with sourcemaps", + "type": "chrome", + "request": "attach", + "port": 9222, + "sourceMaps": true, + "webRoot": "${workspaceRoot}/src/client", + "sourceMapPathOverrides": { + "app/*": "${webRoot}/app/*" + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..c8c47c75f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "typescript.tsdk": "node_modules/typescript/lib", + "search.exclude": { + "**/coverage_js": true, + "**/coverage": true, + "**/dist": true + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..b5bf37ae7 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "version": "0.1.0", + "command": "npm", + "isShellCommand": true, + "showOutput": "always", + "suppressTaskName": true, + "tasks": [ + { + "taskName": "tslint", + "args": [ "run", "lint" ], + "problemMatcher": { + "owner": "tslint", + "fileLocation": [ + "relative", + "${workspaceRoot}" + ], + "severity": "warning", + "pattern": { + "regexp": "^(\\S.*)\\[(\\d+), (\\d+)\\]:\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + } + } + ] +} diff --git a/README.md b/README.md index fd9258115..67391168a 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,3 @@ -# Introduction +# No longer under active maintenance -[![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) - -A seed project for Angular 2 apps. - -It is something similar to the AngularJS Quick Start but does the entire build with gulp. - -**Note:** Angular 2.0 is not production ready yet! This seed project is perfect for playing around with the latest versions but do not start new projects with it since a lot of new changes are going to be introduced until the framework is officially released. - -# How to start - -```bash -git clone https://github.com/mgechev/angular2-seed.git -cd angular2-seed -npm install -# If you don't have gulp already installed -npm install -g gulp -# dev -gulp serve.dev -# prod -gulp serve.prod -``` - -# Directory Structure - -``` -. -├── app -│   ├── components -│   │   ├── about -│   │   │   ├── about.html -│   │   │   └── about.ts -│   │   └── home -│   │   ├── home.html -│   │   └── home.ts -│   ├── services -│   ├── app.css -│   ├── app.html -│   ├── app.ts -│   ├── index.html -│   └── init.ts -├── dist -│   ├── dev -│   └── prod -├── typings -├── gulpfile.js -├── package.json -├── tsconfig.json -└── tsd.json -``` - -# Now to extend? - -If you want to use your custom libraries: - -```bash -npm install my-library --save -vim gulpfile.js -``` -Add reference to the installed library in `PATH.src.lib`. - -# Contributors - -[mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[jgolla](https://github.com/jgolla) | -:---: |:---: |:---: | -[mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[jgolla](https://github.com/jgolla) | - -# Change Log - -You can follow the [Angular 2 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/app/app.css b/app/app.css deleted file mode 100644 index 78daceea6..000000000 --- a/app/app.css +++ /dev/null @@ -1,32 +0,0 @@ -.sample-app-content { - font-family: Verdana; -} -.sample-app-content h1 { - color: #999999; - font-size: 3em; -} -.sample-app-content h2 { - color: #990000; - font-size: 2em; -} -.sample-app-content p, -.sample-app-content nav { - padding: 30px; -} -.sample-app-content li, -.sample-app-content p { - font-size: 1.2em; -} -.sample-app-content li { - font-family: Consolas; -} -.sample-app-content nav a { - display: inline-block; - margin-right: 15px; -} -.sample-app-content input, -.sample-app-content button { - padding: 5px; - font-size: 1em; - outline: none; -} \ No newline at end of file diff --git a/app/app.html b/app/app.html deleted file mode 100644 index 71a65cf5f..000000000 --- a/app/app.html +++ /dev/null @@ -1,8 +0,0 @@ -
- - - -
\ No newline at end of file diff --git a/app/app.ts b/app/app.ts deleted file mode 100644 index 29311f57f..000000000 --- a/app/app.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -import {Component, View, bootstrap, NgFor} from 'angular2/angular2'; -import {RouteConfig, RouterOutlet, RouterLink, routerInjectables} from 'angular2/router'; - -import {Home} from './components/home/home'; -import {About} from './components/about/about'; - -@Component({ - selector: 'app' -}) -@RouteConfig([ - { path: '/', component: Home, as: 'home' }, - { path: '/about', component: About, as: 'about' } -]) -@View({ - templateUrl: './app.html?v=<%= VERSION %>', - directives: [RouterOutlet, RouterLink] -}) -class App {} - - -bootstrap(App, [routerInjectables]); diff --git a/app/components/about/about.html b/app/components/about/about.html deleted file mode 100644 index 54dcfbfdc..000000000 --- a/app/components/about/about.html +++ /dev/null @@ -1,14 +0,0 @@ -

- For reward, here is a list of awesome computer scientists! -

- -

- You want more? Add them yourself! -

-

- - -

- diff --git a/app/components/about/about.ts b/app/components/about/about.ts deleted file mode 100644 index b580feb93..000000000 --- a/app/components/about/about.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {Component, View, NgFor} from 'angular2/angular2'; - -import {NamesList} from '../../services/NameList'; - -@Component({ - selector: 'component-2', - appInjector: [NamesList] -}) -@View({ - templateUrl: './components/about/about.html?v=<%= VERSION %>', - directives: [NgFor] -}) -export class About { - names: Array; - list: NamesList; - - constructor(list: NamesList) { - this.list = list; - this.names = list.get(); - } - addName(newname) { - this.list.add(newname.value); - newname.value = ''; - } -} \ No newline at end of file diff --git a/app/components/home/home.html b/app/components/home/home.html deleted file mode 100644 index 02f649f9d..000000000 --- a/app/components/home/home.html +++ /dev/null @@ -1,10 +0,0 @@ -

Howdy!

- -

-Gratz! -

- -

-Your deployment of Angular 2 Seed worked perfectly! -Click on about to get your reward! -

\ No newline at end of file diff --git a/app/components/home/home.ts b/app/components/home/home.ts deleted file mode 100644 index 65c907c80..000000000 --- a/app/components/home/home.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {Component, View} from 'angular2/angular2'; - -@Component({ - selector: 'component-1' -}) -@View({ - templateUrl: './components/home/home.html?v=<%= VERSION %>', -}) -export class Home {} \ No newline at end of file diff --git a/app/index.html b/app/index.html deleted file mode 100644 index 597316ea3..000000000 --- a/app/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - My Angular 2 App - - - - - - - - Loading... - - - - - - - - \ No newline at end of file diff --git a/app/init.ts b/app/init.ts deleted file mode 100644 index 4967f1deb..000000000 --- a/app/init.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -System.config({ - paths: {'*': '*.js?v=<%= VERSION %>'} -}); - -System.import('./app') - .catch(e => console.error(e, - 'Report this error at https://github.com/mgechev/angular2-seed/issues')); \ No newline at end of file diff --git a/app/services/NameList.ts b/app/services/NameList.ts deleted file mode 100644 index 9ebb50750..000000000 --- a/app/services/NameList.ts +++ /dev/null @@ -1,12 +0,0 @@ -export class NamesList { - names: Array; - constructor() { - this.names = ['Dijkstra', 'Knuth', 'Turing', 'Hopper']; - } - get() { - return this.names; - } - add(value) { - this.names.push(value); - } -} diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..ca5e97f9c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +# AppVeyor file +# http://www.appveyor.com/docs/appveyor-yml +# This file: cloned from https://github.com/gruntjs/grunt/blob/master/appveyor.yml + +# Build version format +version: "{build}" + +# Test against this version of Node.js +environment: + nodejs_version: "Stable" + +build: off + +clone_depth: 10 + +# Fix line endings on Windows +init: + - git config --global core.autocrlf true + +install: + - ps: Install-Product node $env:nodejs_version + - ps: $env:path = $env:appdata + "\npm;" + $env:path + - npm ci && npm install karma-ie-launcher + +test_script: + # Output useful info for debugging. + - node --version && npm --version + # 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 + +notifications: + - provider: Webhook + url: https://webhooks.gitter.im/e/cfd8ce5ddee6f3a0b0c9 + on_build_success: false + on_build_failure: true + on_build_status_changed: true + +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