3 ms·
It seemed to undergo a major rewrite and then died. I could also never really figure it out post-rewrite. Pre-rewrite, I had made some cool macros just out of
by hombre_fatal 7y ago
It seemed to undergo a major rewrite and then died.
I could also never really figure it out post-rewrite. Pre-rewrite, I had made some cool macros just out of intuition after reading some of its examples. Now, I can't get many of its own examples to compile in its live editor.
Too bad. It's about 1000x simpler than, say, implementing low-level Babel transformations.
- yuchi 7y agoI feel the pain. Things got a little bit easier with Babel Plugin Macros and Typescript (which forces you to build macros that adhere to a reasonable type system)
- lioeters 7y agoI've only recently learned about Babel Plugin Macros and haven't used it in production - but here are a few links in case anyone's interested. https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros https://babeljs.io/blog/2017/09/11/zero-config-with-babel-ma... https://github.com/kentcdodds/babel-plugin-macros https://github.com/kentcdodds/babel-plugin-macros https://github.com/jgierer12/awesome-babel-macros https://github.com/jgierer12/awesome-babel-macros These "macros" take a different approach than Sweet.js: they're not syntax extensions, but rather code transformers that you import and use explicitly.