File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change 202
202
:fn-invoke-direct :checked-arrays :closure-module-roots :rewrite-polyfills :use-only-custom-externs
203
203
:watch :watch-error-fn :watch-fn :install-deps :process-shim :rename-prefix :rename-prefix-namespace
204
204
:closure-variable-map-in :closure-property-map-in :closure-variable-map-out :closure-property-map-out
205
- :stable-names :ignore-js-module-exts :opts-cache :aot-cache })
205
+ :stable-names :ignore-js-module-exts :opts-cache :aot-cache :elide-strict })
206
206
207
207
(def string->charset
208
208
{" iso-8859-1" StandardCharsets/ISO_8859_1
1589
1589
(deps-file {} [{:url (deps/to-url " out/cljs/core.js" ) :requires [" goog.string" ] :provides [" cljs.core" ]}])
1590
1590
)
1591
1591
1592
+ (defn elide-strict [js {:keys [elide-strict] :as opts}]
1593
+ (cond-> js
1594
+ (not (false ? elide-strict))
1595
+ (->
1596
+ (string/replace " \" use strict\" " " " )
1597
+ (string/replace " 'use strict'" " " ))))
1598
+
1592
1599
(defn output-one-file [{:keys [output-to] :as opts} js]
1593
- (cond
1594
- (nil? output-to) js
1600
+ (let [js (elide-strict js opts)]
1601
+ (cond
1602
+ (nil? output-to) js
1595
1603
1596
- (or (string? output-to)
1597
- (util/file? output-to))
1598
- (let [f (io/file output-to)]
1599
- (util/mkdirs f)
1600
- (spit f js))
1604
+ (or (string? output-to)
1605
+ (util/file? output-to))
1606
+ (let [f (io/file output-to)]
1607
+ (util/mkdirs f)
1608
+ (spit f js))
1601
1609
1602
- :else (println js)))
1610
+ :else (println js) )))
1603
1611
1604
1612
(defn output-deps-file [opts sources]
1605
1613
(output-one-file opts (deps-file opts sources)))
1733
1741
out-file (io/file output-to)]
1734
1742
(util/mkdirs out-file)
1735
1743
(spit out-file
1736
- (as-> source source
1744
+ (as-> ( elide-strict source opts) source
1737
1745
(if (= name :cljs-base )
1738
1746
(add-header opts source)
1739
1747
source)
You can’t perform that action at this time.
0 commit comments