File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 (println " Building features:" (str/join " , " (map :name feature-configs)) " ..." ))
4040 (if (seq feature-configs)
4141 (apply str cmd'
42- (map (fn [m] (format " --config-merge '%s'" (pr-str (:shadow-config m))))
43- feature-configs))
42+ (map (fn [m] (format " --config-merge '%s'" (pr-str (:shadow-config m))))
43+ (into feature-configs
44+ [{:shadow-config {:compiler-options {:source-map true }}}])))
4445 cmd')))
4546
4647(defn build
6970
7071(defn release
7172 " Compiles release build."
72- [args & {:keys [wrap-cmd-fn] :or {wrap-cmd-fn identity}}]
73+ [args & {:keys [wrap-cmd-fn include-source-map? ] :or {wrap-cmd-fn identity}}]
7374 (build (wrap-cmd-fn " -M -m shadow.cljs.devtools.cli --force-spawn release modules" )
7475 args)
7576 #_ (spit " lib/nbb_core.js"
76- (str/replace (slurp " lib/nbb_core.js" ) (re-pattern " self" ) " globalThis" ))
77- (run! fs/delete (fs/glob " lib" " **.map" ))
77+ (str/replace (slurp " lib/nbb_core.js" ) (re-pattern " self" ) " globalThis" ))
78+ (when-not include-source-map? ( run! fs/delete (fs/glob " lib" " **.map" ) ))
7879 #_ (move-ext-lib " lib/nbb_schema.js" " ext/nbb-prismatic-schema/index.mjs" )
7980 #_ (move-ext-lib " lib/nbb_malli.js" " ext/nbb-metosin-malli/index.mjs" ))
You can’t perform that action at this time.
0 commit comments