Giter Site home page Giter Site logo

angular2-es6-seed's Introduction

Angular2 ES6 seed

Build Status Dependency Status GitHub license

NPM

A simple seed project to demonstrate bootstrapping of Angular2 using ES6 (The Sixth Edition of JavaScript, known as ES6 or ECMAScript 2015). The project uses (among other things):

Prerequisites

Initial setup

From the root directory of this project, run the following commands:

npm install -g gulp
npm install

Updating when package.json changes

All JavaScript dependencies of the project are specified in the file package.json in the root folder. If this file is updated (new dependency is added, something is removed, or something is updated), you have to run the command:

npm install

to make sure you have all the latest dependencies (the folder node_modules will be updated by this command).

Running the application

Build

Initially, you will not have the folder dist. This folder will contain the built web application from the sources. To build the application, you need to run the command:

gulp dist

Simple HTTP server (with LiveReload)

To run a simple HTTP server (that will serve the built static site, contained in folder dist), in a separate console window run:

gulp start

This simple server will automatically reload the browser if something changes in the dist folder.

Ease of development

To continuously re-build the project when you change some files, in a separate console window run:

gulp watch

If the watcher is running, and you change some code, the project will be rebuilt, dist folder will be updated. Thus, if you have watch and start gulp tasks running in parallel, development of the application becomes a breathe.

JavaScript unit tests

To run JavaScript unit tests, in a separate console window run:

gulp test

This command can be further tailored for your needs. Available variations:

gulp test --once
gulp test --browser chrome
gulp test --browser phantomjs
gulp test --browser chrome --once
...

The order of parameters to gulp test does not matter.

Coverage

To gather coverage status (percent of JavaScript code covered by JS unit tests), in a separate console window run:

gulp coverage

Upon completion, this command will output in the console coverage statistics, and will generate a folder coverage with nicely formated HTML coverage report.

Linting JS code

To run ESLint (will check ES6 JavaScript code), you need to run the following command:

gulp lint

All JavaScript files in this project fall under the eye of ESLint.

Similar projects

The following projects aim to bridge the gap between Angular2 and ES6/ES7/ES.Next using 3rd party Babel plugins babel-plugin-transform-decorators-legacy or babel-preset-angular2:

Useful resources

License

This project is licensed under the MIT license. Please see LICENSE file for more information.

angular2-es6-seed's People

Contributors

valera-rozuvan avatar

Watchers

James Cloos avatar Pankaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.