jsw icon indicating copy to clipboard operation
jsw copied to clipboard

consider using babel

Open datapimp opened this issue 9 years ago • 3 comments

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

datapimp avatar Mar 13 '16 10:03 datapimp

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.

mark-hahn avatar Mar 13 '16 17:03 mark-hahn

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…

danielbayley avatar Mar 20 '16 01:03 danielbayley

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

On Sat, Mar 19, 2016 at 6:02 PM, Daniel [email protected] 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

mark-hahn avatar Mar 20 '16 01:03 mark-hahn