Skip to content

sunny762/babel-angular2-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Angular 2 app with Babel

A skeleton Angular 2 app built with Babel and Browserify.

  • Uses Babel instead of TypeScript/Traceur.
  • Supports class/parameter decorators and parameter type annotations with Babel and a Babel transformer plugin.
  • Bundles JavaScript files into one file with Browserify. (However, it doesn't use any Browserify-specific technology. You can easily switch to Webpack and etc.)

Try

Install

Clone/fork this repo and:

npm install -g gulp-cli
npm install

Build

gulp build

Watch

gulp

Preview

npm install -g http-server
http-server public

Motivation

Back in the time of angular2 alpha.18, angular/quickstart provided us to try Angular 2 app with on-the-fly transpilation and lazy-loading, which resulted in long waiting time for each file change. Also, I was not familiar with the Traceur tool stack and its output. angular2 npm package said The files under /es6 are es6 compatible files that can be transpiled to es5 using any transpiler. So I gave it a shot.

Babel transformer plugin

To support parameter decorator and parameter type metadata of Angular 2, this skeleton app uses the following external Babel transformer plugin that I made:

TODO

  • Support source map.

About

A skeleton Angular 2 app built with Babel and Browserify.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 91.1%
  • HTML 8.9%