Emerjoin / Hi-Framework-features

Java EE Framework
5 stars 1 forks source link

ES6/ES2015 and ES7/ES2016 support using a transpiler #96

Closed emjunior258 closed 7 years ago

emjunior258 commented 7 years ago

Hi-Framework must integrate easily with transpilers from ES6/7 to ES5 like Babel

emjunior258 commented 7 years ago

Solving the problems using a Maven plugin integrated with webpack

Transpile to ES5 from ES6/7/JSX or even TypeScript

The plugin would simply allow the invocation of the webpack command, allowing to pass arguments and also to define the directory from which it should be invoked (optionally). This way, the hi-es5.js script wouldn't have to be generated in runtime, it could be generated right during the build process (generate-sources step), keeping it as the only back-end script included in the template files.

Modularization

Webpack demands an entry point in order to do its magic. The run.js script could be this entry point, being the perfect place to include the framework modules the application depends on. If the run.js script will be the entry point a few questions must be answered?

How will a view controller be exported?


export var ControllerAction = object;

How will a view controller be imported?


import someLib = require('ControllerAction');