Easy way to do jpm build and then run the executable? #1100
-
I have a jpm project set up to build an executable. Is there a way to get jpm to build and then run that executable straight away? Or do I need to write a wrapper script? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Mmm, you could make a custom build rule: (declare-executable
:name "hello"
:entry "main.janet")
(rule "hello" ["build"]
(shell "build/hello")) And execute it with |
Beta Was this translation helpful? Give feedback.
-
Yeah that works well for me. It's a game/interactive toy made with Jaylib so command line arguments aren't a problem, just running it is fine. I somehow missed the P.S. Ian, your blogposts and book on Janet got me interested in the language, so thanks for that too. 😄 |
Beta Was this translation helpful? Give feedback.
Mmm, you could make a custom build rule:
And execute it with
jpm -l run hello
. But I'm not sure if jpm has a nice way to forward command line arguments to your script...