Could not create ClojureScript quick launch with optimization

I'm having problems with the Production Builds Quick Launch ClojureScript section . In particular, when I run: java -cp "cljs.jar;src" clojure.main release.cljI get a java exception:

Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/dev2/Experiments/cljscript/hello_world/out/cljs/core.js, compiling:(C:\dev2\Experiments\cljscript\hello_world\release.clj:3:1)

I do this on Windows, and I suspect that the google close compiler does not like the Windows-style path, especially the colon. My release.clj:

(require 'cljs.build.api)

(cljs.build.api/build "src"
{
    :output-to "out/main.js"
    :optimizations :advanced
})

(System/exit 0)

and I call it with java -cp "cljs.jar;src" clojure.main release.clj. If I comment out the line: optimizations, then the assembly will succeed.

My fine-tuning is here: https://github.com/PaulRobson/cljs-quickstart

+4
source share
1 answer

This is a known issue https://dev.clojure.org/jira/browse/CLJS-2401

,

(require 'cljs.build.api)

(cljs.build.api/build "src"
{
    :output-to "out-foo/main.js"
    :optimizations :advanced
})

(System/exit 0)
+5

Source: https://habr.com/ru/post/1689295/


All Articles