Skip to content

jafaryor/TreeComponent

Repository files navigation

Introduction

Angular 2 Style Guide Build Status Build Status Join the chat at https://gitter.im/mgechev/angular2-seed MIT license Dependency Status devDependency Status

Provides fast, reliable and extensible starter for the development of Angular 2 projects.

angular2-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.
  • 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.
  • End-to-end tests with Protractor.
  • Development server with Livereload.
  • Following the best practices.
  • Manager of your type definitions using typings.
  • Has autoprefixer and css-lint support.

How to start

Note that this seed project requires node v4.x.x or higher and npm 2.14.7.

Here is how to speed-up the build on Windows.

In order to start the seed use:

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 build.docs

# dev build
npm run build.dev
# prod build
npm run build.prod
# prod build with AoT compilation
npm run build.prod.exp

# 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.

Table of Contents

Configuration

Default application server configuration

var PORT             = 5555;
var LIVE_RELOAD_PORT = 4002;
var DOCS_PORT        = 4003;
var APP_BASE         = '/';

Configure at runtime

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:

npm start -- --config-env ENV_NAME

Currently the ENV_NAMEs 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.

How to extend?

Visit the Wiki page of the project.

Running tests

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

# 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

About

TreeComponent written in Angular2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published