jslogo
jslogo copied to clipboard
Factor library out into separate source file
This will require dropping dependencies on variables/functions in the closure (which is probably for the best anyway)
I think it might be a good idea to use Babel before this too, as ES6isms could be useful in this refactoring, specifically arrow functions requiring a few less .bind(this)s. At least I have gotten used to ES6 and miss it here ;)
Of course then there's a build system and all that... maybe Webpack makes sense? Seems like this project fits that well.
If we start transpiling we can use async/await and the code will be nice and clean again. I'll have to decide if I am willing to commit to that approach yet.
On Feb 7, 2016, at 9:13 AM, Ian Bicking [email protected] wrote:
I think it might be a good idea to use Babel before this too, as ES6isms could be useful in this refactoring, specifically arrow functions requiring a few less .bind(this)s. At least I have gotten used to ES6 and miss it here ;)
Of course then there's a build system and all that... maybe Webpack makes sense? Seems like this project fits that well.
— Reply to this email directly or view it on GitHub.
So far I've avoiding async/await because it will no longer be entirely clear to me how the transpiled code relates to the original code. But then because I've avoided it I've also no evidence one way or the other ;)