Skip to content

How do you import a Risor file into another Risor file ? #58

Answered by myzie
serge-hulne asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, this is available in Risor v0.8.0, which is on homebrew as well.

For example, add to a lib.risor file:

func add(x, y) { x + y }

Then you can run the CLI with risor -c "import lib; lib.add(3, 4)"

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by myzie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants