# angular2-seed **Repository Path**: yinpinghui/angular2-seed ## Basic Information - **Project Name**: angular2-seed - **Description**: angular2 + gulp - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-03-01 - **Last Updated**: 2021-10-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Introduction [![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide) [![Build Status](https://travis-ci.org/mgechev/angular2-seed.svg?branch=master)](https://travis-ci.org/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) [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT) [![Dependency Status](https://david-dm.org/mgechev/angular2-seed.svg)](https://david-dm.org/mgechev/angular2-seed) [![devDependency Status](https://david-dm.org/mgechev/angular2-seed/dev-status.svg)](https://david-dm.org/mgechev/angular2-seed#info=devDependencies) A seed project for Angular 2 apps. It is something similar to the Angular Quick Start but does the entire build with gulp. `angular2-seed` provides the following features: - Ready to go, statically typed build system using gulp for working with TypeScript. - Production and development builds. - 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 for your application’s structure](https://github.com/mgechev/angular2-style-guide). - Manager of your type definitions using [typings](https://github.com/typings/typings). - Basic Service Worker, which implements "Cache then network strategy". # How to start **Note** that this seed project requires node v4.x.x or higher and npm 2.14.7. You must have `ts-node` installed as global. If you don't, use: ```bash npm install -g ts-node ``` In order to start the seed use: ```bash git clone --depth 1 https://github.com/mgechev/angular2-seed.git cd angular2-seed # install the project's dependencies npm install # watches your files and uses livereload by default npm start # api document for the app npm run docs # dev build npm run build.dev # prod build npm run build.prod ``` _Does not rely on any global dependencies._ # Table of Content - [Introduction](#introduction) - [How to start](#how-to-start) - [Table of Content](#table-of-content) - [Configuration](#configuration) - [How to extend?](#how-to-extend) - [Running tests](#running-tests) - [Contributing](#contributing) - [Examples](#examples) - [Directory Structure](#directory-structure) - [Contributors](#contributors) - [Change Log](#change-log) - [License](#license) # Configuration Default application server configuration ```javascript 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/ ``` # How to extend? Visit the [Wiki page](https://github.com/mgechev/angular2-seed/wiki) of the project. # Running tests ```bash npm test # Debug - In two different shell windows npm run build.test.watch # 1st window npm run karma.start # 2nd window # 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 # 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/angular2-seed/blob/master/CONTRIBUTING.md) file for guidelines. # Examples Forks of this project demonstrate how to extend and integrate with other libraries: - https://github.com/justindujardin/angular2-seed - integration with [ng2-material](https://github.com/justindujardin/ng2-material) - https://github.com/archfirst/angular2-seed-sass - integration with [Sass](http://sass-lang.com/) - https://github.com/AngularShowcase/angular2-sample-app - sample Angular 2 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 2 application using Wordpress [JSON-API](http://v2.wp-api.org) backend. - https://github.com/AngularShowcase/angular2-seed-example-mashup - Angular 2 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) # Directory Structure ``` . ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── src │ ├── about │ │ └── components │ │ ├── about.e2e.ts │ │ ├── about.html │ │ ├── about.ts │ │ └── about.spec.ts │ ├── app │ │ └── components │ │ ├── app.css │ │ ├── app.e2e.ts │ │ ├── app.html │ │ ├── app.ts │ │ └── app.spec.ts │ ├── assets │ │ ├── img │ │ │ └── smile.png │ │ └── main.css │ ├── home │ │ └── components │ │ ├── home.css │ │ ├── home.html │ │ ├── home.ts │ │ ├── home.e2e.ts │ │ └── home.spec.ts │ ├── shared │ │ └── services │ │ ├── name_list.ts │ │ └── name_list.spec.ts │ ├── hot_loader_main.ts │ ├── main.ts │ └── index.html ├── dist ├── tools │ ├── manual_typings │ ├── tasks │ ├── utils │ ├── config.ts │ └── utils.ts ├── appveyor.yml ├── gulpfile.ts ├── karma.conf.js ├── package.json ├── protractor.conf.js ├── test-main.js ├── tsconfig.json ├── tslint.json └── typings.json ``` # Contributors [mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[tarlepp](https://github.com/tarlepp) |[NathanWalker](https://github.com/NathanWalker) |[nareshbhatia](https://github.com/nareshbhatia) |[jesperronn](https://github.com/jesperronn) | :---: |:---: |:---: |:---: |:---: |:---: | [mgechev](https://github.com/mgechev) |[ludohenin](https://github.com/ludohenin) |[tarlepp](https://github.com/tarlepp) |[NathanWalker](https://github.com/NathanWalker) |[nareshbhatia](https://github.com/nareshbhatia) |[jesperronn](https://github.com/jesperronn) | [d3viant0ne](https://github.com/d3viant0ne) |[aboeglin](https://github.com/aboeglin) |[ryzy](https://github.com/ryzy) |[natarajanmca11](https://github.com/natarajanmca11) |[JakePartusch](https://github.com/JakePartusch) |[larsthorup](https://github.com/larsthorup) | :---: |:---: |:---: |:---: |:---: |:---: | [d3viant0ne](https://github.com/d3viant0ne) |[aboeglin](https://github.com/aboeglin) |[ryzy](https://github.com/ryzy) |[natarajanmca11](https://github.com/natarajanmca11) |[JakePartusch](https://github.com/JakePartusch) |[larsthorup](https://github.com/larsthorup) | [ouq77](https://github.com/ouq77) |[jerryorta-dev](https://github.com/jerryorta-dev) |[devanp92](https://github.com/devanp92) |[evanplaice](https://github.com/evanplaice) |[LuxDie](https://github.com/LuxDie) |[c-ice](https://github.com/c-ice) | :---: |:---: |:---: |:---: |:---: |:---: | [ouq77](https://github.com/ouq77) |[jerryorta-dev](https://github.com/jerryorta-dev) |[devanp92](https://github.com/devanp92) |[evanplaice](https://github.com/evanplaice) |[LuxDie](https://github.com/LuxDie) |[c-ice](https://github.com/c-ice) | [ojacquemart](https://github.com/ojacquemart) |[TuiKiken](https://github.com/TuiKiken) |[juristr](https://github.com/juristr) |[dstockhammer](https://github.com/dstockhammer) |[briantopping](https://github.com/briantopping) |[dszymczuk](https://github.com/dszymczuk) | :---: |:---: |:---: |:---: |:---: |:---: | [ojacquemart](https://github.com/ojacquemart) |[TuiKiken](https://github.com/TuiKiken) |[juristr](https://github.com/juristr) |[dstockhammer](https://github.com/dstockhammer) |[briantopping](https://github.com/briantopping) |[dszymczuk](https://github.com/dszymczuk) | [brendanbenson](https://github.com/brendanbenson) |[dwido](https://github.com/dwido) |[koodikindral](https://github.com/koodikindral) |[jeffbcross](https://github.com/jeffbcross) |[johnjelinek](https://github.com/johnjelinek) |[justindujardin](https://github.com/justindujardin) | :---: |:---: |:---: |:---: |:---: |:---: | [brendanbenson](https://github.com/brendanbenson) |[dwido](https://github.com/dwido) |[koodikindral](https://github.com/koodikindral) |[jeffbcross](https://github.com/jeffbcross) |[johnjelinek](https://github.com/johnjelinek) |[justindujardin](https://github.com/justindujardin) | [philipooo](https://github.com/philipooo) |[lihaibh](https://github.com/lihaibh) |[tandu](https://github.com/tandu) |[inkidotcom](https://github.com/inkidotcom) |[markharding](https://github.com/markharding) |[mjwwit](https://github.com/mjwwit) | :---: |:---: |:---: |:---: |:---: |:---: | [philipooo](https://github.com/philipooo) |[lihaibh](https://github.com/lihaibh) |[tandu](https://github.com/tandu) |[inkidotcom](https://github.com/inkidotcom) |[markharding](https://github.com/markharding) |[mjwwit](https://github.com/mjwwit) | [ocombe](https://github.com/ocombe) |[gdi2290](https://github.com/gdi2290) |[typekpb](https://github.com/typekpb) |[Brooooooklyn](https://github.com/Brooooooklyn) |[redian](https://github.com/redian) |[Bigous](https://github.com/Bigous) | :---: |:---: |:---: |:---: |:---: |:---: | [ocombe](https://github.com/ocombe) |[gdi2290](https://github.com/gdi2290) |[typekpb](https://github.com/typekpb) |[Brooooooklyn](https://github.com/Brooooooklyn) |[redian](https://github.com/redian) |[Bigous](https://github.com/Bigous) | [robertpenner](https://github.com/robertpenner) |[sclausen](https://github.com/sclausen) |[tapas4java](https://github.com/tapas4java) |[butterfieldcons](https://github.com/butterfieldcons) |[jgolla](https://github.com/jgolla) |[ultrasonicsoft](https://github.com/ultrasonicsoft) | :---: |:---: |:---: |:---: |:---: |:---: | [robertpenner](https://github.com/robertpenner) |[sclausen](https://github.com/sclausen) |[tapas4java](https://github.com/tapas4java) |[butterfieldcons](https://github.com/butterfieldcons) |[jgolla](https://github.com/jgolla) |[ultrasonicsoft](https://github.com/ultrasonicsoft) | # Change Log You can follow the [Angular 2 change log here](https://github.com/angular/angular/blob/master/CHANGELOG.md). # License MIT