Skip to content

Commit

Permalink
Merge pull request #125 from whamtet/master
Browse files Browse the repository at this point in the history
allow :requires to be vector
  • Loading branch information
yogthos committed Dec 31, 2023
2 parents ce1fcb6 + 26a082d commit 5daa043
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/kit-generator/src/kit/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
(modules/list-modules ctx))
:done)

(declare install-module)
(defn install-dependency [module-key]
(if (vector? module-key)
(apply install-module module-key)
(install-module module-key)))

(defn install-module
([module-key]
(install-module module-key {:feature-flag :default}))
Expand All @@ -33,7 +39,7 @@
(let [module-config (generator/read-module-config ctx modules module-key)]
(println module-key "requires following modules:" (get-in module-config [feature-flag :requires]))
(doseq [module-key (get-in module-config [feature-flag :requires])]
(install-module module-key))
(install-dependency module-key))
(generator/generate ctx module-key opts))
(println "no module found with name:" module-key))
:done)))
Expand Down

0 comments on commit 5daa043

Please sign in to comment.