Conversation
|
Rebased onto the old and new trailing comma convention. Having this in would help testing on IE9 thanks to the browserify step. |
This allows using ES6 syntax in our code, while maintaining backwards compatibility for the generated file.
As babelify is slow, it may be desriable to not run it during development. This is OK if the browser is recent enough to understand ES6 natively. (This does not include current Firefox due to it having problems with for(const … in …), https://bugzilla.mozilla.org/show_bug.cgi?id=1094995.) For older browsers, or to check issues possibly introduced by babelify, adding /babel as the first component of the path will switch to a version which has been processed by babelify. This is also used for screenshots.
|
|
||
| function twoBrowserified(url, file, standaloneName) { | ||
| app.get(url, serveBrowserified(file, standaloneName, false)); | ||
| app.get("/babel" + url, serveBrowserified(file, standaloneName, true)); |
There was a problem hiding this comment.
I tried this out and there's a noticeable lag... thanks for setting this up a separate route.
| if (!katexURL) { | ||
| katexIP = req.query.ip; | ||
| katexURL = "http://" + katexIP + ":" + katexPort + "/"; | ||
| katexURL = "http://" + katexIP + ":" + katexPort + "/babel/"; |
| process.exit(1); | ||
| } else { | ||
| console.log("OK"); | ||
| } |
There was a problem hiding this comment.
This is the fix for the node version check?
There was a problem hiding this comment.
Yes, this version should work on all reasonable versions of GNU make, contrary to a version I had before some fixup.
|
This is the future step in modernizing the codebase. I'm excited. Thanks @gagern. |
|
I realized that this does slow down the screenshotter immensely. I guess we should try to come up with a solution to do screenshot tests with a cached version. Or perhaps even with the build version, as present on the file system. Something like that. |
With 0.7.0 released, it might be a good time to do the planned switch to ES6 now. And this PR here is the first step in that direction.
vartoconstorletas appropriate.eslintonly ever allows one of these two alternatives. The main purpose of this step is demonstrating that the transformations actually get applied as intended.