mark-hahn / jsw

A translator for an alternate Javascript syntax that uses significant whitespace
MIT License
29 stars 1 forks source link

consider using babel #2

Open datapimp opened 8 years ago

datapimp commented 8 years ago

https://github.com/acdlite/babel-plugin-handbook

Hi -- I thought I'd share this link with you just in case you haven't considered using this tool to accomplish your goal. Just at first glance it seems like it handles a lot of the hard parts of what you're trying to do.

disclaimer: haven't looked very deeply into the history of you project but I saw you have been trying to crack this nut for a long time and reading this handbook for me was the first time I ever felt like this kind of source -> source compiling might be within reach

sincerely,

another displaced coffeescript lover now fully converted to es6

mark-hahn commented 8 years ago

It does look a good tool to base AST work on. I've not given up on the goal even though I've tried and failed three times. Thanks for the link.

danielbayley commented 8 years ago

As someone who hates unnecessary brackets all over the place and some of the syntax decisions made in ES6 (especially back ticks for strings), I hope this project can gain some traction.

I think a Babel syntax plugin is definitely the way to go…

PostCSS is basically Babel for CSS, and now has a plugin for parsing indented syntax (see also here) into the AST to pass on to the rest of the ecosystem.

This basically replaces Sass and it's indented flavour in the same way that Babel & ES6 is supposedly displacing CoffeeScript, so I thought it relevent.

I don't think anyone should be forced into a particular syntax; the Atom package mentioned in the README to seamlessly translate between the 2 would be a really nice tool to have. I had a similar idea, including dealing with the whole tabs/spaces argument in the same way…

One other point is that JSW is already taken on npm, so maybe a different name would be a good idea…

mark-hahn commented 8 years ago

Thanks for the feedback. I'll worry about the name JSW later.

On Sat, Mar 19, 2016 at 6:02 PM, Daniel notifications@github.com wrote:

As someone who hates unnecessary brackets all over the place and some of the syntax decisions made in ES6 (especially back ticks for strings), I hope this project can gain some traction.

I think a Babel syntax plugin is definitely the way to go…

PostCSS https://github.com/postcss/postcss is basically Babel for CSS, and now has a plugin https://github.com/postcss/sugarss for parsing indented syntax (see also here https://github.com/postcss/postcss/issues/495) into the AST to pass on to the rest of the ecosystem.

This basically replaces Sass and it's indented flavour in the same way that Babel & ES6 is supposedly displacing CoffeeScript, so I thought it relevent.

I don't think anyone should be forced into a particular syntax; the Atom package mentioned in the README to seamlessly translate between the 2 would be a really nice tool to have. I had a similar idea, including dealing with the whole tabs/spaces argument in the same way…

One other point is that JSW https://www.npmjs.com/package/jsw is already taken on npm, so maybe a different name would be a good idea…

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/mark-hahn/jsw/issues/2#issuecomment-198816931