atuttle / zoidbox

An IRC bot that (attempts to) bring the knowledge and wit of @boyzoid to ##coldfusion on freenode
3 stars 6 forks source link

explore porting to io.js and ES6 #20

Open ryanguill opened 9 years ago

ryanguill commented 9 years ago

what are your thoughts on using something like traceur or 6to5 that would require a compile/transpile step? If you aren't against it, do you have opinions on how to do that? manually / gulp / grunt / something else?

I think jumping to io.js at the current moment may be premature, but even if we do there are tons of es6 features we still wouldn't get without a transpiler - so maybe sticking with node and just adding a transpiler would be the easiest thing at the moment. thoughts?

atuttle commented 9 years ago

Agreed all the way around. Not enough experience to pick a transpiler with any confidence; though I know traceur has been around for a while... However we do it, it'll need to be done as a startup script so that it doesn't affect continuous deployment.

ryanguill commented 9 years ago

can you give an example of the startup script you're talking about? this would be something heroku would run?

atuttle commented 9 years ago

We can add any commands we want to the build & deploy process, e.g. npm transpile which would refer to {"scripts": { "transpile": "whatever we want here" } } from package.json, or we could make it part of the zoidbox startup itself, sort of how TaffyDocs compiles markdown into HTML during its startup.

atuttle commented 9 years ago

https://devcenter.heroku.com/changelog-items/595

ryanguill commented 9 years ago

We need to discuss how to go forward with this from a git perspective. I haven't started yet, but it is very likely that the structure will change drastically with the new modules - its also possible that the modules may encourage us to split things out further than we already have. Do we want to do this as a branch and then merge - understanding that the history will probably not be very useful? Should we do it as a new project that "merges" back in with this one at some point? Is there another option I haven't thought of?

atuttle commented 9 years ago

In in favor of branching in this project. The history won't align but that doesn't make it useless. :) On Jan 30, 2015 6:35 PM, "Ryan Guill" notifications@github.com wrote:

We need to discuss how to go forward with this from a git perspective. I haven't started yet, but it is very likely that the structure will change drastically with the new modules - its also possible that the modules may encourage us to split things out further than we already have. Do we want to do this as a branch and then merge - understanding that the history will probably not be very useful? Should we do it as a new project that "merges" back in with this one at some point? Is there another option I haven't thought of?

Reply to this email directly or view it on GitHub https://github.com/atuttle/zoidbox/issues/20#issuecomment-72289331.

ryanguill commented 9 years ago

so, using babel (6to5) and node require hooks, I was able to write an es6 plugin using the extension .es alongside our regular .js es5 plugins. Just a simple echo at the moment to see that its working. I haven't gotten my editor to play nice with the new syntax yet - and ive tried switching from jshint to eslint to get better support for the es6 syntax, but haven't successfully gotten that integrated yet either - but the es6 syntax is working and with no extra compile step. On a separate branch for now.