ramdascript
ramdascript copied to clipboard
export form
Hi, ramdascript looks awesome.
I was curious what the correct export form?
Input:
(def x (fn []
(console.log 'hi')))
(export x)
Expected:
var x = function () {
return console.log('hi');
}
export default x;
Actual:
var x = function () {
return console.log('hi');
https://yosbelms.github.io/ramdascript/#link:(def%20x%20(fn%20%5B%5D%0A%20%20(console.log%20'hi')))%0A%0A(export%20x)
RamdaScript compiler supports several output formats. Try putting the source code in a file and run
ram compile -src ./my-file.ram
The result should be a my-file.js with the exported object according to the CommonJS standard.