ES2015 base project (server and browser)

Project URL:!/project/frill-bard

ES2015 base project

This project uses Babel to transpile both back-end and front-end JavaScript on-the-fly, and SystemJS to load transpiled modules in the browser.


Change presets and other Babel options by updating the “babel” section of package.json

How it works

  1. HyperDev runs the start command which passes server.js through Babel (obeying options in package.json) and then runs the resulting JavaScript.
  2. The server.js defines an Express server and middleware function which passes all requests ending in “.js” through Babel’s transformFile.
  3. User requests the index in their browser.
  4. Back-end serves index.html.
  5. Browser loads SystemJS.
  6. Browser requests app.js.
  7. Back-end transpiles app.js using same options from step 1, but with SystemJS module definitions.
  8. Browser evaluates ES5 code generated by previous step.

Thanks for the add to Community Projects!

1 Like