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
Should we refactor for ES6? #6
Comments
Would love to see a version with ES6 ! And why not with Typescript (I read your comment on HN saying you'd use it if build steps were allowed) Great work anyway. Would love to see more. P.S. I'm not fluent enough in JS to help you going forward >.< |
I took a crack at it because I haven't played with native modules much and I was curious. Here is the diff set: main...perfectsquircle:feature/es6 I started by running Lebab to take care of the boilerplate changes. lebab --replace public/scripts --transform \
arrow,\
arrow-return,\
obj-method,\
obj-shorthand,\
for-of,\
for-each,\
let,\
template
# destruct-param <-- interesting changes, but broke some things Then I converted everything on the global VT object into modules. It was actually very easy because everything was already scoped nicely. My takeaway: it's interesting to note the differences, but maybe it should exist only as a fork for comparison sake? The original art is interesting because of the hard constraints. In the readme you state
I'm curious what ideas you had for this. |
Thanks for your effort @perfectsquircle - looking good although missing some steps (convert HTML string arrays to template literals, simplify one-line functions e.g. I remember not being super happy with the wording
and I should change it; ES6 does reduce verbosity, and therefore the duplication may hurt less, but it's structurally the same duplication. That can only be solved through helpers (as far as I can tell). In any case I agree with you, I think it made sense to hit "rock-bottom" at least once with ES5. I'm inclined to keep it as it is and let an ES6 version be a fork or a branch just for reference. I'll keep this discussion open for a while and see if there's more demand. If you want to progress on your ES6 fork, feel free, would be interesting to see exactly how much simpler it gets :) thanks again! |
1.5 years later... done :) |
No description provided.
The text was updated successfully, but these errors were encountered: