@@ -5,39 +5,23 @@ title: Javascript Libraries packaged for Clojurescript |
5 | 5 |
|
6 | 6 | ### Why |
7 | 7 |
|
8 | | -<p class="tldr"><strong>TLDR</strong> CLJSJS provides Javascript |
9 | | -libraries and appropriate extern files. It also tries to be a vehicle |
10 | | -for discussion about developing a standard way to depend on Javascript |
11 | | -libraries from Clojurescript projects.</p> |
12 | | - |
13 | | -In Clojure, Java interoperability or "interop" is a core feature. In |
14 | | -Clojurescript, interop with Javascript libraries does not work |
15 | | -out-of-the-box across optimization modes. Extern files or "externs" |
16 | | -required for advanced optimizations are often hard to find. To fix |
17 | | -this, all CLJSJS artifacts ship with proper [externs] for the Closure |
18 | | -compiler. |
19 | | - |
20 | | -Besides the issue of externs, there is another problem: there is no |
21 | | -standard way to depend on Javascript projects. Om and Reagent depend |
22 | | -on React but use [wildly][reagent-template] |
23 | | -[different][chestnut-devmode] [ways][mies-om-template] to import |
24 | | -React.js. Besides being a hub for externs, CLJSJS also attempts to |
25 | | -provide artifacts for Javascript libraries that Clojurescript projects |
26 | | -can depend on. |
| 8 | +Since Clojurescript 0.0-2727 the `:foreign-libs` option provides an |
| 9 | +excellent way to integrate Javascript into Clojurescript |
| 10 | +applications. CLJSJS provides Javascript libraries and their |
| 11 | +appropriate extern files packaged up with `deps.cljs`. CLJSJS aims to |
| 12 | +concentrate packaging efforts to make everyone's live a little easier. |
27 | 13 |
|
28 | 14 | ### Documentation |
29 | 15 |
|
30 | | -Currently there are [tasks for Boot][boot-cljsjs] for adding externs |
31 | | -and Javascript files to builds. As externs and preamble are specified |
32 | | -explicitly as filepaths in `lein-cljsbuild` there is no such mechanism |
33 | | -for it yet. |
34 | | - |
35 | | -Creating packages is straightforward as well and detailed instructions |
36 | | -can be found in the [packages repository][packages-repo]. |
| 16 | +CLJSJS packages are gathered on Github in |
| 17 | +[cljsjs/packages][packages-repo]. There you can also find usage |
| 18 | +instructions, request new libraries to be packaged or contribute |
| 19 | +yourself. |
37 | 20 |
|
38 | | -Please refer to the documentation of the separate projects in the |
39 | | -[CLJSJS organization][cljsjs-org] on Github for more. Thanks. |
| 21 | +We use [Boot][boot] to make packaging quick and easy but it is not |
| 22 | +required to make use of CLJSJS packaged Jars. |
40 | 23 |
|
| 24 | +[boot]: https://github.com/boot-clj/boot |
41 | 25 | [externs]: https://developers.google.com/closure/compiler/docs/api-tutorial3 |
42 | 26 | [reagent-template]: https://github.com/reagent-project/reagent-template/blob/master/src/leiningen/new/reagent/resources/templates/index.html#L11-L19 |
43 | 27 | [chestnut-devmode]: https://github.com/plexus/chestnut/blob/ae3140e76a145aa2275cc9b056d8dbc0a738794c/src/leiningen/new/chestnut/src/clj/chestnut/dev.clj#L10-L15 |
|
0 commit comments