Getting started with Angular + JSPM + ES6

InstructorScott Moss

Share this video with your friends

Send Tweet

JSPM allows you to load any client package from github and npm in any module format. Learn how to use it to create a great workflow with Angular and ES6.

Kendrick
~ 9 years ago

How do you incorporate JSPM into a production build? Specifically I need to transpile LESS to a concatenated app.css, and I need to pre-process *.js with ng-annotate prior to transpile + minify for the bundle.

At the moment the only path I can see is to use gulp to pre-process the sources and output the compiled files into a build folder then bundle from that folder, although this creates some consternation over how to structure the app with the remaining static assets.

I want to be able to run a watch on the files, edit, auto-compile and reload the browser and run tests.

When I am done, run bundle and process all files into an index.html, one or more bundle.js and my image/font folders.

Then Deploy the final package and run e2e tests.

Finally archive the zipped folder of assets.

How do we do all this?