New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES2015 standards #167
Comments
Hi @bluzi the generator is designed to support the same version range of Node.js that Express.js itself supports, which is Node.js 0.10 and higher. Node.js 0.10 does not understand let/const and arrow functions, which is why the generated code doesn't use them. Now, that's just the history. There is no reason why someone could not add in the ability to generate both the old ES5 style and the newer ES2015 style under a switch to let the users choose between the two. The generator could even automatically generate using ES2015 if the user didn't specify which one and the generator was run on a version of Node.js that supported ES2015. |
Hi @dougwilson , Thanks for the response. |
@dougwilson @bluzi Is this still being worked on? What else needs to be done? |
Hi @benhalverson, I couldn't find time to work on it yet. However, it seems like @sisisin created an ES2015 template on his fork, so maybe you should check that out. |
yes I guess majority of us are embracing eslint and es6 these days, if express-generator can catch up on this it will be fantastic. |
Why don't you add babel for compile ES6? |
This is quite long overdue. I think it will help a lot more people for this to be implemented than to maintain compatibility. What's stopping this from being implemented? I can make a pull request with my fork that is merged with version 4.15. Shall I merge it with 4.16? |
Pull request #176 addresses this and looks close to completion. They just need to figure out how it should behave and be tested on older versions of node. |
If you want to keep compatibility with legacy node, a commandline flag would be a good choice for this. The help output would look like
with the default choice being current/ES5 output. Is node 0.10.0 even LTS anymore? |
@ogrotten no, Node.js 0.10.0 has been released in 2013... The current LTS is 8.10.0, and express-generator still didn't seem to adapt to this new version. |
I wish I was smart enough to help get PR #176 ready to be merged, but I'm not there yet with my coding. However, as a new guy, I'm trying to focus my learning on ES2015/classes designs, and this would really help. Any update? Thanks, guys. |
@dougwilson, why do you need to maintain old version of node? Or we can say that if you want to generate a repo for node v0.10, you'll have to use express-generator vX.X, but those versions aren't maintained anymore. |
Any roadmap when ES6 will be supported by a stable version of ExpressJS Generator out-of-box? |
Hi,
I am using this generator to kickstart most of my ExpressJS projects, and it's real good, but I always wonder why you use var and functions instead of let/const and arrow functions?
I always change it myself when I kickstart a project.
Is there any particular reason for that? If not, I can make change and and create a pull request.
The text was updated successfully, but these errors were encountered: