diff --git a/lein-jank/README.md b/lein-jank/README.md index 89a1f82cc..6a9d6a0af 100644 --- a/lein-jank/README.md +++ b/lein-jank/README.md @@ -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 ` +- 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 ` Make sure you have `jank` executable on your path. diff --git a/lein-jank/src/leiningen/jank.clj b/lein-jank/src/leiningen/jank.clj index 75ecc711b..9962d4563 100644 --- a/lein-jank/src/leiningen/jank.clj +++ b/lein-jank/src/leiningen/jank.clj @@ -14,7 +14,7 @@ :extra-env (System/getenv)} "jank" command - "--class-path" + "--module-path" classpath "--" args))