Skip to content

Commit

Permalink
fix(lein-jank): module-path parameter + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Samy-33 committed Jan 17, 2025
1 parent 18dd00c commit b6a506d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
27 changes: 19 additions & 8 deletions lein-jank/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ A Leiningen plugin to do many wonderful things with jank.

## Usage

Clone this repository. Execute `lein install` in the repository root.

Create a leiningen project: `lein new my-app`

Put `[lein-jank "0.0.1-SNAPSHOT"]` into the `:plugins` vector of your project.clj.

And voila, you can now run your jank files in the project.
`lein jank run <filepath>`
- Execute `lein install` in the `lein-jank`'s root..
- Create a leiningen project: `lein new my-app`
- Update the name of the source file `src/my_app/core.clj` to be a jank file i.e. `src/my_app/core.jank`
- Add a `-main` function to the `core.jank`
```clojure
(defn -main [& args]
(println "Hello, world!")
(println "Args: " args))
```
- Put `[org.jank-lang/lein-jank "0.0.1-SNAPSHOT"]` into the `:plugins` vector of your project.clj.
- Set the `:main` key in the project.clj to `my-app.core`
```clojure
(defproject my-app "v0.0.1"
...
:plugins [[org.jank-lang/lein-jank "0.0.1-SNAPSHOT"]]
:main my-app.core
...)
```
- Run the project: `lein jank run <args>`

Make sure you have `jank` executable on your path.

Expand Down
2 changes: 1 addition & 1 deletion lein-jank/src/leiningen/jank.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:extra-env (System/getenv)}
"jank"
command
"--class-path"
"--module-path"
classpath
"--"
args))
Expand Down

0 comments on commit b6a506d

Please sign in to comment.