File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 2065
2065
result (.compile cc (url->nio-path rsc) source)]
2066
2066
(.source result))
2067
2067
source)]
2068
- (cond-> source'
2069
- (= :goog module) add-goog-load)))
2068
+ (str " /*TRANSPILED*/"
2069
+ (cond-> source'
2070
+ (= :goog module) add-goog-load))))
2071
+
2072
+ (defn requires-transpile? [out-file]
2073
+ (let [line (first (line-seq (io/reader out-file)))]
2074
+ (not (string/starts-with? line " /*TRANSPILED*/" ))))
2070
2075
2071
2076
(comment
2072
2077
(println (slurp (io/resource " goog/math/long.js" )))
2107
2112
(and res (util/changed? out-file res))
2108
2113
; ; always re-emit GCL libs under optimizations higher than :none
2109
2114
; ; :none will just use the cached transpiled result
2110
- (and transpile? (not= :none optimizations))))
2115
+ (and transpile?
2116
+ (or (not= :none optimizations)
2117
+ (requires-transpile? out-file)))))
2111
2118
(when (and res (or ana/*verbose* (:verbose opts)))
2112
2119
(util/debug-prn " Copying" (str res) " to" (str out-file)))
2113
2120
(util/mkdirs out-file)
You can’t perform that action at this time.
0 commit comments