|
6 | 6 | [cljs.analyzer :as ana] |
7 | 7 | [cljs.compiler :as comp] |
8 | 8 | [cljs.env :as env] |
9 | | - [cljs.compiler :as cljs-comp] |
10 | 9 | [shadow.cljs.util :as util] |
11 | 10 | [shadow.build.output :as output] |
12 | 11 | [shadow.build.warnings :as warnings] |
|
17 | 16 | [shadow.core-ext :as core-ext] |
18 | 17 | [shadow.build.resource :as rc] |
19 | 18 | [shadow.debug :refer (?> ?-> ?->>)] |
20 | | - [clojure.data.json :as json] |
21 | | - [shadow.debug :as dbg]) |
22 | | - (:import (java.io StringWriter ByteArrayInputStream FileOutputStream File StringReader) |
| 19 | + [clojure.data.json :as json]) |
| 20 | + (:import (java.io StringWriter ByteArrayInputStream FileOutputStream) |
23 | 21 | (com.google.javascript.jscomp JSError SourceFile CompilerOptions CustomPassExecutionTime |
24 | 22 | CommandLineRunner VariableMap SourceMapInput DiagnosticGroups |
25 | 23 | CheckLevel JSModule CompilerOptions$LanguageMode |
26 | 24 | Result ShadowAccess |
27 | | - SourceMap$DetailLevel SourceMap$Format ClosureCodingConvention CompilationLevel AnonymousFunctionNamingPolicy DiagnosticGroup NodeTraversal StrictModeCheck VariableRenamingPolicy PropertyRenamingPolicy PhaseOptimizer) |
28 | | - (shadow.build.closure ReplaceCLJSConstants NodeEnvInlinePass ReplaceRequirePass PropertyCollector NodeStuffInlinePass FindSurvivingRequireCalls ClearUnassignedJsRequires) |
| 25 | + SourceMap$DetailLevel SourceMap$Format ClosureCodingConvention CompilationLevel AnonymousFunctionNamingPolicy DiagnosticGroup VariableRenamingPolicy PropertyRenamingPolicy PhaseOptimizer) |
| 26 | + (shadow.build.closure ReplaceCLJSConstants NodeEnvInlinePass ReplaceRequirePass PropertyCollector NodeStuffInlinePass FindSurvivingRequireCalls) |
29 | 27 | (com.google.javascript.jscomp.deps ModuleLoader$ResolutionMode) |
30 | 28 | (java.nio.charset Charset) |
31 | 29 | [java.util.logging Logger Level] |
|
329 | 327 |
|
330 | 328 | content |
331 | 329 | (str (->> file-globals |
332 | | - (map #(cljs-comp/munge % #{})) |
| 330 | + (map #(comp/munge % #{})) |
333 | 331 | (sort) |
334 | 332 | (map #(str "/** @const {ShadowJS} */ var " % ";")) |
335 | 333 | (str/join "\n")) |
336 | 334 | "\n" |
337 | 335 | (->> file-props |
338 | 336 | (sort) |
339 | | - (map #(cljs-comp/munge % #{})) |
| 337 | + (map #(comp/munge % #{})) |
340 | 338 | (map #(str "ShadowJS.prototype." % ";")) |
341 | 339 | (str/join "\n")))] |
342 | 340 |
|
|
360 | 358 | content |
361 | 359 | (str (->> js-globals |
362 | 360 | (remove known-js-globals) |
363 | | - (map #(cljs-comp/munge % #{})) |
| 361 | + (map #(comp/munge % #{})) |
364 | 362 | (sort) |
365 | 363 | (map #(str "/** @const {ShadowJS} */ var " % ";")) |
366 | 364 | (str/join "\n")) |
367 | 365 | "\n" |
368 | 366 | (->> js-props |
369 | 367 | (sort) |
370 | | - (map #(cljs-comp/munge % #{})) |
| 368 | + (map #(comp/munge % #{})) |
371 | 369 | (map #(str "ShadowJS.prototype." % ";")) |
372 | 370 | (str/join "\n")))] |
373 | 371 |
|
|
1302 | 1300 | (if (and (:import require-loc) (or (= :goog type) (= :shadow-js type))) |
1303 | 1301 | ;; goog supports import ... from "goog:cljs.core" in ES6 files |
1304 | 1302 | ;; but not for commonjs require |
1305 | | - (str "goog:" (cljs-comp/munge ns)) |
| 1303 | + (str "goog:" (comp/munge ns)) |
1306 | 1304 | (str "/" resource-name))] |
1307 | 1305 |
|
1308 | 1306 | (str (subs source 0 (inc offset)) |
|
1419 | 1417 | (case type |
1420 | 1418 | ;; just in case we add the goog.provide for cljs/closure namespaces |
1421 | 1419 | (:cljs :goog :shadow-js) |
1422 | | - (str "goog.provide(\"" (cljs-comp/munge ns) "\");") |
| 1420 | + (str "goog.provide(\"" (comp/munge ns) "\");") |
1423 | 1421 | (throw (ex-info (format "whats this? %s type: %s" resource-name type) {})))))) |
1424 | 1422 | (into [])) |
1425 | 1423 |
|
|
0 commit comments