Compiling external JS files using Cljsbuild in ClojureScript

I am trying to compile some of the JS libraries that we have with lein-cljsbuild in order to integrate them into our ClojureScript code base. First, I added a few goog.provide at the beginning of each file, and the files are hierarchically organized in a directory tree according to their namespace (for example, in Java). This namespace abc is located in src-js / libs / a / b / c.js

I put the JS files in the root directory of the projects in src-js / libs and I have the following: compiler options for lein-cljsbuild:

{:id "prod",
 :source-paths ["src-cljs" "src-js"]
 :compiler
 {:pretty-print false,
  :libs ["libs/"]
  :output-to "resources/public/js/compiled-app.js",
  :optimizations :simple}}

None of the JS files compiles to a compiled application file. What's wrong?

I also tried putting them in resources / close-js / libs without success.

I am using lein-cljsbuild 0.3.0.

+5
1

-, , , classpath project.clj. , "src/js" "source-paths:" - , .

-, , project.clj, , - "libs:", ; , , , *.js ( ), . , , , test.js /src/js, libs: : "src/js/test.js". . cljs-build, plugin default: libs.

-, ( , , , ), REPL ( ) REPL ( repl-listen cljsbuild), // REPL, require: - compiled-app.js(, "(ns testing (: require [myprivatelib])), , compile (lein cljsbuild ) compiled-app.js. , . REPL , , , .

, .

+4

All Articles