Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export form #9

Open
quangv opened this issue Apr 20, 2018 · 1 comment
Open

export form #9

quangv opened this issue Apr 20, 2018 · 1 comment

Comments

@quangv
Copy link

quangv commented Apr 20, 2018

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)

@yosbelms
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants