Hivetek / Planetoid

A spiritual successor to Nade Planet.
GNU General Public License v2.0
1 stars 0 forks source link

Add Flow support #6

Open PeterSR opened 9 years ago

PeterSR commented 9 years ago

We will use Flow to get type checking of JavaScript.

To this end, we will need to create a system using jstransform to transpile the type annotated JS code to non-annotated, meaning that the development cycle requires and additional step, namely type check and transpile. As a perk, we can add additional transformations which will allow us to use neat new ES6 features, classes etc.

To goal is to maintain a rapid development cycle, for instance visiting the project page (localhost:8080) will automatically type check, transpile and run the code. Other alternatives include having a command-line tool that does these things.

The manual way to do this is:

$ flow check
$ jstransform --strip-types --harmony --watch src/ build/