Skip to content

Instantly share code, notes, and snippets.

@leafgarland
Created June 12, 2020 21:08
Show Gist options
  • Save leafgarland/1aa0501433058060a0f62c115ab4ad58 to your computer and use it in GitHub Desktop.
Save leafgarland/1aa0501433058060a0f62c115ab4ad58 to your computer and use it in GitHub Desktop.
simple janet quickbin example: build with `jpm quickbin main.janet fmt`
(import spork/fmt)
(defn main [_ filename]
(fmt/format-file filename))
(declare-project
:name "fmt"
:description "formats janet code"
:dependencies ["https://github.com/janet-lang/spork"])
(declare-executable
:name "fmt"
:entry "main.janet")
@leafgarland
Copy link
Author

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