Skip to content

Commit 8db5b76

Browse files
committed
add public cljs.build.api/handle-js-sources & public cljs.build.api/dependency-order
1 parent c193a4b commit 8db5b76

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/main/clojure/cljs/build/api.clj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
[cljs.util :as util]
1818
[cljs.analyzer :as ana]
1919
[cljs.analyzer.api :as ana-api]
20-
[cljs.closure :as closure])
20+
[cljs.closure :as closure]
21+
[cljs.js-deps :as deps])
2122
(:import [java.io File]))
2223

2324
;; =============================================================================
@@ -150,6 +151,18 @@
150151
[opts & ijss]
151152
(closure/add-dependencies opts ijss))
152153

154+
(defn handle-js-modules
155+
"Given a collection of IJavaScript values representing a build, index all
156+
node modules, convert all JS modules (ES6 etc), and store the updated
157+
js-dependency-index (likely changed due to modules) in compiler state."
158+
[state xs opts]
159+
(closure/handle-js-modules opts xs state))
160+
161+
(defn dependency-order
162+
"Topologically sort a collection of IJavaScript values."
163+
[xs]
164+
(deps/dependency-order xs))
165+
153166
(defn add-implicit-options
154167
"Given a valid map of build options add any standard implicit options. For
155168
example :optimizations :none implies :cache-analysis true and :source-map

0 commit comments

Comments
 (0)