Created
June 12, 2020 21:08
-
-
Save leafgarland/1aa0501433058060a0f62c115ab4ad58 to your computer and use it in GitHub Desktop.
simple janet quickbin example: build with `jpm quickbin main.janet fmt`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import spork/fmt) | |
(defn main [_ filename] | |
(fmt/format-file filename)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(declare-project | |
:name "fmt" | |
:description "formats janet code" | |
:dependencies ["https://github.com/janet-lang/spork"]) | |
(declare-executable | |
:name "fmt" | |
:entry "main.janet") |
Author
leafgarland
commented
Jun 12, 2020
If you have no dependencies or the the dependencies are already in your system, then you can also use jpm quickbin
to make an executable without a project.janet
> jpm quickbin main.janet fmt
> ./fmt main.janet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment