Simple Boilerplate for using React and Esri's JavaScript API together. It supports IE 9+ and the last two versions of all major browsers and can run in https or http. For data management, it's using Alt.js (a flux library).
This is referring to http://flowtype.org, Facebook's static type checker for javascript.
There is a branch called flowtype that has some boilerplate for getting flowtypes to check props and things in raw src at compile time and not at run time. This is a really useful feature as it can statically check whether or not people are using components and functions correctly before a build is ever deployed for testing.
Things Working:
components are checking other component types
components can see other components types even when they are not in the same file
figure out aliases so flow can easily find other files imported in
utility and helper functions work
Things to look into:
Help flow understand Alt.js exports so actions and store methods can type check
Learn more about custom declarations and how to correctly use them
Current start command uses & for parallelism, e.g. (npm run babel & gulp start & gulp serve). This does not work reliably on windows and since the & runs things in the background, this potentially causes issues when an error occurs, leaving a process running in the background. This has been spotted when someone's start task throws an error or quits and then they save a js file and babel is still running, which has to be killed with the kill command.
Thanks for making this boilerplate. It seems great. However, I cannot get the npm start command to work. The "npm start" command stops at the following line:
src\locals.js -> build\locals.js
.. and then it just stays there, with nothing happening. Do you know a workaround for this?
running mkdir -p on some windows machines seems to throw an error about the syntax not being correct. And also a fellow dev had no success with the r.js command until she changed it to r.js.cmd.
I will test r.js.cmd on Mac and if it works will update the builds and see about an alternative to mkdir -p if it becomes an issue.
Also not using gulp task babel:polyfill which is needed for older browsers like IE <= 9, so I need to simply add that to the gulp build and gulp dist commands.