Skip to content

Commit 7a8803e

Browse files
symfrogdnolen
authored andcommitted
CLJS-2338: Support renamePrefix{Namespace} closure compiler option
1 parent fc94001 commit 7a8803e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
:emit-constants :ups-externs :ups-foreign-libs :ups-libs :warning-handlers :preloads
167167
:browser-repl :cache-analysis-format :infer-externs :closure-generate-exports :npm-deps
168168
:fn-invoke-direct :checked-arrays :closure-module-roots :rewrite-polyfills :use-only-custom-externs
169-
:watch :watch-error-fn :watch-fn :install-deps :process-shim})
169+
:watch :watch-error-fn :watch-fn :install-deps :process-shim :rename-prefix :rename-prefix-namespace})
170170

171171
(def string->charset
172172
{"iso-8859-1" StandardCharsets/ISO_8859_1
@@ -254,6 +254,14 @@
254254
(. compiler-options
255255
(setRewritePolyfills (:rewrite-polyfills opts))))
256256

257+
(when (contains? opts :rename-prefix)
258+
(. compiler-options
259+
(setRenamePrefix (:rename-prefix opts))))
260+
261+
(when (contains? opts :rename-prefix-namespace)
262+
(. compiler-options
263+
(setRenamePrefixNamespace (:rename-prefix-namespace opts))))
264+
257265
(. compiler-options
258266
(setOutputCharset (to-charset (:closure-output-charset opts "UTF-8"))) ;; only works > 20160125 Closure Compiler
259267
)

0 commit comments

Comments
 (0)