-
Notifications
You must be signed in to change notification settings - Fork 65
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
Switch to ES6 #173
Comments
Hi @oparoz! |
I think you're on the right path. We would keep all source files in Also, it would be a great opportunity to add testing (#344) as we go along |
@oparoz that sounds great! Ultimately it's your call :) |
I don't think that's necessary. I simply would like for the code to be more robust, easier to understand and testable. Regarding ES6 classes, I'd like to hear what @BernhardPosselt, @icewind1991 and maybe @PVince81 have to say about it. When reading es6 code, I find import/export statements useful per example. |
I'm unsure if this is a well defined GSOC task (mechanical turk work :D) and if its a benefit to do this right now. FYI Modules are not implemented in any browser yet and you also dont see them listed on kangax' es6 table which means that you will have to transpile no matter what. The transpiling experience itself is quite horrible IMHO, there are too many choices (typescript, es6, coffeescript) too many tools (gulp, webpack, browserify) and too much configuration and headaches (karma). I've given up and will gradually enhance newer code so I won't have to transpile. |
Another addition to ES6 modules: the current wrapper logic (in whatever module loader) is vastly different from the actual spec, so this has potential to break when you don't use the wrapper anymore. |
Thank you for your valuable input @BernhardPosselt . I created the issue last year as a long term goal to modernize and better organize the app. That's the reason I wanted to focus on classes and modules first and didn't mind having to transpile everything. Having said that, there will probably be an issue with debugging, because the end result in the browser will not match what we wrote. This makes it even harder for people not familiar with the project. If we drop transpiling then it becomes, as you've mentioned, only about migrating methods and I doubt students will find this project interesting. What do you think @Siddharth11? Have you looked at the code in Gallery and do you see some opportunities to improve the overall architecture? Have you worked on projects of similar size using ES6 + transpiling? |
This issue was moved to nextcloud/gallery#34 |
Now that ES 6 is official, we can begin to think about switching to it, but none of the browsers or transpilers support all the features, so it's probably a task for 2016.
https://kangax.github.io/compat-table/es6/
We currently support ES5 in strict mode.
It would be a great opportunity to add testing (#344) as we go along
Sponsorship
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: