thomasloh / 5to6 Goto Github PK
View Code? Open in Web Editor NEWConvert ES5 code to ES6
License: MIT License
Convert ES5 code to ES6
License: MIT License
Hey, I was wondering if you would be open to the idea of making the middleware that runs source transforms as seperate npm modules.
It would make it easier for people (such as myself) to develop/contribute middleware modules for other lexical transforms.
Also along with that maybe exposing an api to register/deregister middleware components to make customizing stuff easier.
I would be willing to do these things if you're open to the idea.
After install it i get this error trying to run 5to6:
module.js:338
throw err;
^
Error: Cannot find module 'Set'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/jaydson/.nvm/v0.11.14/lib/node_modules/5to6/src/modules/convert-require-stmt-to-import-stmt.js:6:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/jaydson/.nvm/v0.11.14/lib/node_modules/5to6/src/index.js:10:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
jaydson@jaydson:~/Workspace/transpileption$
A few weeks ago I created this...and just went to try to publish it today:
https://github.com/5to6/5to6
Looks like you beat me to it by a few days!
I think architecturally our 2 things look a bit different, but I think we have the same goals. Would you have any interesting in combining?
Windows Git is installed. Everything in the target folder (which is a copy, anyway, so I don't really care about git here) is committed to git.
git status says:
$ git status
On branch master
nothing to commit, working directory clean
yet running 5to6 exits with
git must to be installed. In case want to revert changes, can use git reset --h ard
Why haven't you used ES6 features like classes, let, imports for this repository. Since it being a converter to ES6, it would be better for it to follow ES6 conventions
Something like https://babeljs.io/repl/ would be totally awesome
Comments should not be wiped out! Ran this and it wiped out comments!
It would be great if we could transpile constructor functions to classes.
Convert this:
function Fuu(fuu) {
this.fuu = fuu;
}
Fuu.prototype.bar = function(arg) {
console.log(arg);
}
Into this:
class Fuu {
constuctor(fuu) {
this.fuu = fuu;
}
bar(arg) {
console.log(arg);
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.