https://github.com/ryanseddon/es6-module-macro
ES6 Module macro that expands to commonjs
https://github.com/ryanseddon/es6-module-macro
Last synced: about 2 months ago
JSON representation
ES6 Module macro that expands to commonjs
- Host: GitHub
- URL: https://github.com/ryanseddon/es6-module-macro
- Owner: ryanseddon
- License: mit
- Created: 2014-01-23T09:29:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-23T09:37:36.000Z (over 11 years ago)
- Last Synced: 2025-03-25T01:08:02.713Z (2 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
es6-module-macro
================ES6 Module macro that expands to commonjs
## WIP
This is a work in progress and is really very easily broken but that's the beauty of macros they're personal syntax extensions.
## Sweetjs
This macro can be compiled using [sweetjs](http://sweetjs.org) or you can check it out in the [live editor](http://sweetjs.org/browser/editor.html#macro%20import%20{%0A%09rule%20{%0A%09%09{%20$modules%20%28,%29%20...%20}%20from%20$module:lit;%0A%09}%20=%3E%20{%0A%09%09$%28var%20$modules%20=%20require%28$module%29.$modules;%29%20...%0A%09}%0A}%0A%0Aimport%20{%20support,%20dispatchClick%20}%20from%20%27./utils%27;%0Aimport%20{%20foo%20}%20from%20%27./goo%27;%0A%0Amacro%20export%20{%0A%09rule%20{%0A%09%09{%20$modules%20%28,%29%20...%20};%0A%09}%20=%3E%20{%0A%09%09$%28exports.$modules%20=%20$modules;%29%20...%0A%09}%0A}%0A%0Aexport%20{%20support,%20dispatchClick%20};%0Aexport%20{%20goo%20};).
## License
Copyright 2014, Ryan Seddon
This content is released under the MIT license
http://ryanseddon.mit-license.org