/angular-es6-browserify-demo

This is a light startup project for angular, ES6, and browserify.

Primary LanguageJavaScriptMIT LicenseMIT

angular-es6-browserify-demo

This is a light startup project for angular, ES6, and browserify. You can use it to quickly start playing with angular front-end. It also documents using ES6-to-ES5 (babel transpiler), browserify, and ng-annotate (via browserify-ngannotate).

If you want to play around with angular-material, I also created a handy startup front-end project angular-es6-browserify-material-demo.

Installing

In order to install run

npm install

Building

I use browserify in this project to create a single js bundle that then will be loaded by the client. gulp is used to orchiestrate the whole bundling process. To build, simply run:

gulp

This will run the default gulp task, which first runs gulp sass to compile scss files into plain css. Then it runs gulp build. If you do not change anything in your scss files, you can just directly run gulp build.

gulp build will create a dist folder where it puts two files: index.js and index.js.map. As you see this is a debug version. I use exorcist to separate the source map files from the actual javascript bundle.

You can use gulp watch to have your javascript being continuously observed and rebuilt each time a change happens.

Running

Just for the sake of experimenting I am using koa as the server.

To begin serving, just run:

npm start

ToDo