BaristaLabs / barista-core

NodeJS Based Barista Experiment. Provides the core functionality.
1 stars 0 forks source link

Add optional Babel support to enable ES7 functionality (Specifically async/await) #16

Open Oceanswave opened 8 years ago

Oceanswave commented 8 years ago

Under a request header, allow ES7 functionality to be exposed while under the scenes, scripts are transpiled to the latest ECMAScript version the underlying engine supports. Leave implementation details abstracted.

E.g.

Header: X-Barista-ES7

would use babel-runtime to transpile the script to ES6 for execution in the script environment. If/when V8 gets revved with ES7 functionality in the future, the transpilation step would be removed.

Oceanswave commented 8 years ago

Note - TypeScript 1.7 and above adds support for async/await methods -- thus support for TypeScript would overlap the functional requirement of having async/await support, but under a different technical implemention...