From da4eb1d078ad9b099bc4be4b343899357989d49c Mon Sep 17 00:00:00 2001 From: Blaine Schmeisser Date: Sat, 17 Aug 2013 11:22:54 -0500 Subject: [PATCH] Allow for command line usage. ~~~ bash -> lein run arg1 arg2 "arg[12]" -> lein run colour color "colo(?:ur|r)" ~~~ --- project.clj | 3 ++- src/frak/cli.clj | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/frak/cli.clj diff --git a/project.clj b/project.clj index 95a3aa3..1f68073 100644 --- a/project.clj +++ b/project.clj @@ -4,4 +4,5 @@ :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.4.0"]] - :profiles {:dev {:dependencies [[criterium "0.4.1"]]}} ) + :profiles {:dev {:dependencies [[criterium "0.4.1"]]}} + :main frak.cli ) diff --git a/src/frak/cli.clj b/src/frak/cli.clj new file mode 100644 index 0000000..55575c1 --- /dev/null +++ b/src/frak/cli.clj @@ -0,0 +1,7 @@ +(ns frak.cli + (:require [frak])) + +(defn -main + "Passes arguments to frak/pattern" + [& args] + (println (frak/pattern args))) \ No newline at end of file -- 2.25.1