cljsjs / packages Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: Javascript libraries packaged up with Google Closure externs
Home Page: http://cljsjs.github.io
DEPRECATED: Javascript libraries packaged up with Google Closure externs
Home Page: http://cljsjs.github.io
Seems like the react-with-addons extern is missing many public methods of addons:
CSSTransitionGroup
LinkedStateMixin
PureRenderMixin
TransitionGroup
batchedUpdates
cloneWithProps
update
This breaks our code in advanced compilation since we use transition group
[02:58am] michaniskin: onetom: if you want you can post issues on the cljsjs repo with packages you'd like to see
[02:58am] michaniskin: and we can do them as we get around to it
[02:59am] michaniskin: of course pull requests are also welcome :)
So here it goes. I wish it would be packaged up, because we are already using it in 3 different repos and now we have to upgrade them to the latest version too, so it would be great to have it packaged.
The source from FDT is somehow mis-compiled/mis-packaged, so that the columns are never actually properly left-offset. Replacing the clojars version with the distributed version from GH seems to fix the issue.
Please add these. Thanks!
var React = {};
React.addons = {};
React.addons.TestUtils = {}
React.addons.TestUtils.renderIntoDocument = function () {};
React.addons.TestUtils.isComponentOfType = function () {};
React.addons.TestUtils.isDOMComponent = function () {};
React.addons.TestUtils.isCompositeComponent = function () {};
React.addons.TestUtils.isCompositeComponentWithType = function () {};
React.addons.TestUtils.isTextComponent = function () {};
React.addons.TestUtils.findAllInRenderedTree = function () {};
React.addons.TestUtils.scryRenderedDOMComponentsWithClass = function () {};
React.addons.TestUtils.findRenderedDOMComponentWithClass = function () {};
React.addons.TestUtils.scryRenderedDOMComponentsWithTag = function () {};
React.addons.TestUtils.findRenderedDOMComponentWithTag = function () {};
React.addons.TestUtils.scryRenderedComponentsWithType = function () {};
React.addons.TestUtils.findRenderedComponentWithType = function () {};
React.addons.TestUtils.mockComponent = function () {};
React.addons.TestUtils.simulateNativeEventOnNode = function () {};
React.addons.TestUtils.simulateNativeEventOnDOMComponent = function () {};
React.addons.TestUtils.nativeTouchData = function () {};
React.addons.TestUtils.Simulate = {};
React.addons.TestUtils.Simulate.blur = function () {};
React.addons.TestUtils.Simulate.click = function () {};
React.addons.TestUtils.Simulate.contextMenu = function () {};
React.addons.TestUtils.Simulate.copy = function () {};
React.addons.TestUtils.Simulate.cut = function () {};
React.addons.TestUtils.Simulate.doubleClick = function () {};
React.addons.TestUtils.Simulate.drag = function () {};
React.addons.TestUtils.Simulate.dragEnd = function () {};
React.addons.TestUtils.Simulate.dragEnter = function () {};
React.addons.TestUtils.Simulate.dragExit = function () {};
React.addons.TestUtils.Simulate.dragLeave = function () {};
React.addons.TestUtils.Simulate.dragOver = function () {};
React.addons.TestUtils.Simulate.dragStart = function () {};
React.addons.TestUtils.Simulate.drop = function () {};
React.addons.TestUtils.Simulate.focus = function () {};
React.addons.TestUtils.Simulate.input = function () {};
React.addons.TestUtils.Simulate.keyDown = function () {};
React.addons.TestUtils.Simulate.keyPress = function () {};
React.addons.TestUtils.Simulate.keyUp = function () {};
React.addons.TestUtils.Simulate.load = function () {};
React.addons.TestUtils.Simulate.error = function () {};
React.addons.TestUtils.Simulate.mouseDown = function () {};
React.addons.TestUtils.Simulate.mouseMove = function () {};
React.addons.TestUtils.Simulate.mouseOut = function () {};
React.addons.TestUtils.Simulate.mouseOver = function () {};
React.addons.TestUtils.Simulate.mouseUp = function () {};
React.addons.TestUtils.Simulate.paste = function () {};
React.addons.TestUtils.Simulate.reset = function () {};
React.addons.TestUtils.Simulate.scroll = function () {};
React.addons.TestUtils.Simulate.submit = function () {};
React.addons.TestUtils.Simulate.touchCancel = function () {};
React.addons.TestUtils.Simulate.touchEnd = function () {};
React.addons.TestUtils.Simulate.touchMove = function () {};
React.addons.TestUtils.Simulate.touchStart = function () {};
React.addons.TestUtils.Simulate.wheel = function () {};
React.addons.TestUtils.Simulate.mouseEnter = function () {};
React.addons.TestUtils.Simulate.mouseLeave = function () {};
React.addons.TestUtils.Simulate.change = function () {};
React.addons.TestUtils.Simulate.compositionEnd = function () {};
React.addons.TestUtils.Simulate.compositionStart = function () {};
React.addons.TestUtils.Simulate.compositionUpdate = function () {};
React.addons.TestUtils.Simulate.select = function () {};
React.addons.TestUtils.SimulateNative = {};
React.addons.TestUtils.SimulateNative.blur = function () {};
React.addons.TestUtils.SimulateNative.change = function () {};
React.addons.TestUtils.SimulateNative.click = function () {};
React.addons.TestUtils.SimulateNative.compositionEnd = function () {};
React.addons.TestUtils.SimulateNative.compositionStart = function () {};
React.addons.TestUtils.SimulateNative.compositionUpdate = function () {};
React.addons.TestUtils.SimulateNative.contextMenu = function () {};
React.addons.TestUtils.SimulateNative.copy = function () {};
React.addons.TestUtils.SimulateNative.cut = function () {};
React.addons.TestUtils.SimulateNative.doubleClick = function () {};
React.addons.TestUtils.SimulateNative.drag = function () {};
React.addons.TestUtils.SimulateNative.dragEnd = function () {};
React.addons.TestUtils.SimulateNative.dragEnter = function () {};
React.addons.TestUtils.SimulateNative.dragExit = function () {};
React.addons.TestUtils.SimulateNative.dragLeave = function () {};
React.addons.TestUtils.SimulateNative.dragOver = function () {};
React.addons.TestUtils.SimulateNative.dragStart = function () {};
React.addons.TestUtils.SimulateNative.drop = function () {};
React.addons.TestUtils.SimulateNative.error = function () {};
React.addons.TestUtils.SimulateNative.focus = function () {};
React.addons.TestUtils.SimulateNative.input = function () {};
React.addons.TestUtils.SimulateNative.keyDown = function () {};
React.addons.TestUtils.SimulateNative.keyPress = function () {};
React.addons.TestUtils.SimulateNative.keyUp = function () {};
React.addons.TestUtils.SimulateNative.load = function () {};
React.addons.TestUtils.SimulateNative.mouseDown = function () {};
React.addons.TestUtils.SimulateNative.mouseMove = function () {};
React.addons.TestUtils.SimulateNative.mouseOut = function () {};
React.addons.TestUtils.SimulateNative.mouseOver = function () {};
React.addons.TestUtils.SimulateNative.mouseUp = function () {};
React.addons.TestUtils.SimulateNative.paste = function () {};
React.addons.TestUtils.SimulateNative.reset = function () {};
React.addons.TestUtils.SimulateNative.scroll = function () {};
React.addons.TestUtils.SimulateNative.selectionChange = function () {};
React.addons.TestUtils.SimulateNative.submit = function () {};
React.addons.TestUtils.SimulateNative.touchCancel = function () {};
React.addons.TestUtils.SimulateNative.touchEnd = function () {};
React.addons.TestUtils.SimulateNative.touchMove = function () {};
React.addons.TestUtils.SimulateNative.touchStart = function () {};
React.addons.TestUtils.SimulateNative.wheel = function () {};
would be nice to add
Could you please add support for the following:
//code.jquery.com/jquery-1.11.1.min.js
//cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js
Thank you!
This is a widely popular library in game development and other HTML-based graphics work:
https://github.com/kripken/ammo.js/
It uses the Bullet engine, which is very popular in the game industry, Hollywood, etc. It would be awesome to have a way to use this easily in clojurescript. I add this issue here in case anyone else is interested in it as well.
React requires es5-shim to work with old browsers as stated here. It would be nice to have the shim as cljsjs package and, may be, to add it to react deps. But I'm not sure about nuances of shim externs (it is not so ordinary lib I guess). Will anybody be so generous to package it or to take a look and highlight possible traps?
I am currently using jayq, which is not prepared for cljsjs. However, I would like to use the cljsjs packaging approach anyway and manage the JavaScript needed for jayq using Lein. When specifying cljsjs/jquery as a dependency of my project, jayq cannot find it and I see ReferenceError: jQuery is not defined
on the JavaScript console. How do I do it properly?
When using cljsjs-hammer
in development I get weird JS errors. It looks like the wrong hammer.js
file is packaged, not the aggregated one but this one.
I was investigating how boot creates these cljsjs packages, so I tried running boot package
in each of the package directories. I got the output below. Am I missing something? Thanks
~/code/cljsjs-packages/jquery
$ boot package
clojure.lang.ExceptionInfo: Unable to resolve symbol: fileset in this context
data: {:file "adzerk/bootlaces.clj", :line 53}
java.lang.RuntimeException: Unable to resolve symbol: fileset in this context
...
clojure.core/load/fn core.clj: 5641
clojure.core/load core.clj: 5640
...
clojure.core/load-one core.clj: 5446
clojure.core/load-lib/fn core.clj: 5486
clojure.core/load-lib core.clj: 5485
...
clojure.core/apply core.clj: 626
clojure.core/load-libs core.clj: 5524
...
clojure.core/apply core.clj: 626
clojure.core/require core.clj: 5607
...
boot.user/eval50 boot.user5730488762218156488.clj: 9
...
boot.main/-main/fn main.clj: 126
boot.main/-main main.clj: 126
...
boot.App.runBoot App.java: 217
boot.App.main App.java: 309
It would be less ambiguous to use JS library's tagline/descriptions in this field, rather than the "X library packaged with Closure externs" -- both because it identifies the package better and removes doubt about a package that doesn't mention externs (the inclusion of which should be a given if it is a cljsjs package).
It would be great for ClojureScript users to have a quick visual reference to the JS libraries available as CLJSJS packages. Currently, this involves clicking through this repository's already sizeable directory structure and knowing where this information resides in the build.boot
files (many are not Boot users yet), making discoverability less than ideal.
A script and/or ClojureScript application to produce a static HTML page with up-to-date information would potentially solve these problems if CLJSJS members who commit and push releases rebuild the index after doing so. Furthermore this could be served for free using Github Pages, and additionally linked to or embedded (via iframe) in the main CLJSJS organization's Github page.
I've already come up with a working implementation of part of this locally and would be happy to create a branch for this here, if there's interest. Beforehand, I'd like to see what others thoughts are regarding this approach.
The closure-compiler repository has an extern for jQuery 1.9. Please update the packaged version to that.
Hello
I think this is vaguely what's needed for openlayers v3.
Key points
This doesn't build for me. Hoping you might get it going and include or perhaps just give me some pointers.
Update: A few tweaks (incorporated below) and now it builds. No guarantees beyond that just yet.
(set-env!
:resource-paths #{"resources"}
:dependencies '[[adzerk/bootlaces "0.1.9" :scope "test"]
[cljsjs/boot-cljsjs "0.4.3" :scope "test"]])
(require '[adzerk.bootlaces :refer :all]
'[cljsjs.boot-cljsjs.packaging :refer :all])
(def +version+ "3.1.1-0")
(bootlaces! +version+)
(task-options!
pom {:project 'cljsjs/ol3
:version +version+
:description "openlayers.js v3 packaged up with Google Closure externs"
:url "http://d3js.org/"
:scm {:url "https://github.com/cljsjs/packages"}
:license {"BSD" "http://opensource.org/licenses/BSD-3-Clause"}})
(deftask package []
(comp
; NOTE: Source repo has externs
(download :url "https://github.com/openlayers/ol3/archive/v3.1.1.zip"
:unzip true)
; NOTE: Binary repo has build files
(download :url "https://github.com/openlayers/ol3/releases/download/v3.1.1/v3.1.1.zip"
:unzip true)
(sift :move {
; NOTE: this might not be a suitable format
; #"^build/ol-debug.js" "cljsjs/development/ol3.inc.js"
#"^v3.1.1/build/ol.js" "cljsjs/production/ol3.min.inc.js"})
(sift :include #{#"^cljsjs"})
(deps-cljs :name "cljsjs.ol3")))
DimpleJS is a pretty neat charting library that uses d3 under the hood.
http://dimplejs.org/
See https://github.com/cljsjs/packages/blob/master/react/resources/cljsjs/common/react.ext.js
I suspect "ReactAtrribute" needs to be find-and-replaced to "ReactAttribute"
the way to package files in future would be to download archive during package task and add files from that using sift to fileset:
(deftask package []
(comp
(download-and-unzip :uri "https://github.com/moment/moment/archive/2.8.4.zip" :checksum "foo")
(sift :move {#"moment.*/moment.js" "cljsjs/development/moment.inc.js"
#"moment.*/min/moment.min.js" "cljsjs/production/moment.min.inc.js")
(sift :to-resources #{#"^cljsjs"})
(build-jar)))
The download and unzip task should be implemented somewhere.
I'd like to kindly ask you to include https://github.com/eligrey/FileSaver.js
FileSaver.js is the solution to saving files on the client-side, and is perfect for webapps that need to generate files, or for saving sensitive information that shouldn't be sent to an external server.
I get this error, when i try to eval the namespace.
clojure.lang.ExceptionInfo: No such namespace: cljsjs.react at line 1 file:/C:/Users/deutsch/.m2/repository/rum/rum/0.2.1/rum-0.2.1.jar!/rum.cljs :: {:tag :cljs/analysis-error, :file "file:/C:/Users/deutsch/.m2/repository/rum/rum/0.2.1/rum-0.2.1.jar!/rum.cljs", :line 1, :column 1}
core.clj:4403 clojure.core/ex-info
analyzer.clj:299 cljs.analyzer/error
analyzer.clj:296 cljs.analyzer/error
analyzer.clj:1104 cljs.analyzer/analyze-deps
analyzer.clj:1289 cljs.analyzer/eval3936[fn]
MultiFn.java:249 clojure.lang.MultiFn.invoke
analyzer.clj:1624 cljs.analyzer/analyze-seq
analyzer.clj:1711 cljs.analyzer/analyze[fn]
analyzer.clj:1704 cljs.analyzer/analyze
analyzer.clj:1699 cljs.analyzer/analyze
analyzer.clj:1880 cljs.analyzer/analyze-file[fn]
analyzer.clj:1876 cljs.analyzer/analyze-file
analyzer.clj:1101 cljs.analyzer/analyze-deps
analyzer.clj:1289 cljs.analyzer/eval3936[fn]
MultiFn.java:249 clojure.lang.MultiFn.invoke
analyzer.clj:1624 cljs.analyzer/analyze-seq
analyzer.clj:1711 cljs.analyzer/analyze[fn]
analyzer.clj:1704 cljs.analyzer/analyze
analyzer.clj:1699 cljs.analyzer/analyze
analyzer.clj:1698 cljs.analyzer/analyze
this is the app:
(ns salon.core
(:require [clojure.browser.repl :as repl]
[rum :include-macros true]))
and this is the project.clj
(defproject salon "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2727"]
[rum "0.2.1"]]
:node-dependencies [[source-map-support "0.2.8"]]
:plugins [[lein-cljsbuild "1.0.4"]
[lein-npm "0.4.0"]]
:source-paths ["src" "target/classes"]
:clean-targets ["out/salon" "salon.js" "salon.min.js"]
:cljsbuild {
:builds [{:id "dev"
:source-paths ["src"]
:compiler {
:main salon.core
:output-to "out/salon.js"
:output-dir "out"
:optimizations :none
:cache-analysis true
:source-map true}}
{:id "release"
:source-paths ["src"]
:compiler {
:main salon.core
:output-to "out-adv/salon.min.js"
:output-dir "out-adv"
:optimizations :advanced
:pretty-print false}}]})
Chance.js - random generator library
https://github.com/facebook/css-layout/blob/master/src/main.js
css-layout is written with mutability in mind - exposing the above in addition to Layout.js somehow would make the api exposed to clojurescript much saner. computeLayout
returns nothing.
For general reference this snippet:
(defn compute-layout [layout]
"css-layout is horrifically mutation based"
(let [*nodes* (clj->js layout)]
((.-computeLayout js/computeLayout) ((.-fillNodes js/computeLayout) *nodes*))
((.-extractNodes js/computeLayout) *nodes*)))
Will work in the meantime (not entirely sure I'm adhering to the earmuffs convention properly there).
Moment.ext.js is, based on comment, for 2.0.0. But it looks to me that it doesn't include even all functions that moment.js 2.0.0 does.
I added some fixes but I'm thinking that there should be some way to test the extern file.
I wonder if it would might be possible to run moment code through closure compiler and then run their unittests against that.
Seems pretty useful https://github.com/mailcheck/mailcheck
The current directory structure could make files overwrite each other when being imported to the fileset:
One jar has cljsjs/common/externs.ext.js
and another has the same file. When importing these I assume only the second will remain in the fileset. While this could be fixed by an additional directory like cljsjs/common/project-name/externs.ext.js
I think it might be totally fine to enforce non-overlapping filenames. Could be easily done by CI.
cljsjs/react 0.12.2-5
is included as a sablono dependency
WARNING - Parse error. illegal use of unknown JSDoc tag "providesModule"; ignoring it
* @providesModule warning
Basic question: some libs maintain more than one version branches (i.e. jQuery v1 & v2). How do we handle these in CLJSJS?
@crisptrutski (from #112):
Good question about the dual branches - I'd hazard that yes it would be worthwhile.
It may be worth considering how CLJSJS handles multiple long term versions - perhaps it's worth keeping the heads of both as separate folders (or build tasks), so that they can be bumped independently.
Another example, although not that relevant to the Hoplon/React wielders downstream of CLJSJS, would be Angular. Both v1 and v2 there will be under development for years yet it seems.
Don't see any issue publishing to the same clojars resource, but having to zigzag back to say provide jQuery 1.12.0
would be awkward.
While these are fringe cases, and also there's a high correlation between Clojurescript apps and bleeding-edge-everything, to me the cost of a separate folder or task (package.v1
) is so small that handling the fringes more elegantly is worth it.
Follow-up on #23. @olivergeorge @jeluard
When Javascript libraries like openlayers are written as Closure libraries it would be great to include them as such and profit from things like dead code elimination.
What is the best way to do this in the context of CLJSJS? Does deps.cljs
support the packaging of Closure libs i.e. can it contain a :libs
key similar to the one being passed to the Clojurescript compiler?
I just tried compiling (:advanced mode) a project using papaparse
and get the following warnings:
Jun 24, 2015 1:12:49 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: file:/Users/erik/.m2/repository/cljsjs/papaparse/4.1.1-0/papaparse-4.1.1-0.jar!/cljsjs/papaparse/common/papaparse.ext.js:3: WARNING - name papa is not defined in the externs.
papa.parse = function (csvData, config) {};
^
Jun 24, 2015 1:12:49 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: file:/Users/erik/.m2/repository/cljsjs/papaparse/4.1.1-0/papaparse-4.1.1-0.jar!/cljsjs/papaparse/common/papaparse.ext.js:4: WARNING - name papa is not defined in the externs.
papa.unparse = function (csvData, config) {};
^
var Papa = {};
papa.parse = function (csvData, config) {};
papa.unparse = function (csvData, config) {};
It should be Papa.[un]parse
(uppercase "P" in Papa).
I'm trying to package Facebook's FixedDataTable component. Hoping you can help me along based on your recent experience with ReactRouter.
https://github.com/cljsjs/packages/tree/fixed-data-table
I'm having trouble getting it going. I'm not sure how to generate the externs and what initialisation is needed (webpack related possibly). I had a brief attempt at http://www.dotnetwise.com/Code/Externs/ but no joy.
When I include my packaged version in a clean "lein new mies-om" and (:require) it I get a JS error in the browser which makes me think the JS file isn't initialising correctly and, ultimately, no js/FixedDataTable is available.
Can you give me some tips please.
thanks, Oliver
cljsjs/leaflet seems to be missing from clojars.org.
org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact cljsjs:leaflet:jar:0.7.3-0 in clojars (http://clojars.org/repo/)
Thanks in advance.
I would enjoy a properly packaged version of pixijs. https://github.com/GoodBoyDigital/pixi.js/
Hi,
I'm currently working on a simple wrapper for react-router to be used in reagent
I'm fairly new to the clojurescript environment but cljsjs looks like the best option to include this sort of dependency.
If you agree I'd love to try putting together the package. I might need a bit of direction though :)
thanks!
CodeMirror has plugins (like addon/edit/matchbrackets.js for instance). What's the right way to include them?
Thanks,
PDF.js is a full-blown PDF parser and viewer made completely in JavaScript and HTML5 by Mozilla. It's the very same PDF viewer which is currently integrated into Firefox.
Adding this into cljsjs would allow ClojureScript community to build on top of it more advanced PDF viewers for example Reagent, Om and so forth without them having to embed PDF.js into their source code.
I am unable to require the cljsjs.google-maps package.
I added the dependency to my project.clj
[cljsjs/google-maps "3.18-1"]
and required the google-maps package in my namespace like this:
(ns myapp.service
(:require
cljsjs.google-maps)
I get this compiler error, where the package is listed with an underscore?
clojure.lang.ExceptionInfo: No such namespace: cljsjs.google-maps, could not loc
ate cljsjs/google_maps.cljs or cljsjs/google_maps.cljc at line 1
I am using
[org.clojure/clojure "1.7.0-beta2"]
[org.clojure/clojurescript "0.0-3211"]
I have been at a loss for packaging libraries with optional addons. For example:
Users are expected to include the individual JS files to enable their respective addons. This is to reduce file size, of course.
I saw the React+addons solution in this repo, but this type of solution wouldn't work for multiple combinations of addons.
Ideally, the solution would be to include all addons and have Google Closure eliminate the dead code for you. But obviously, this isn't a general solution for non-closure libraries.
Any ideas?
It seems to me that it might be helpful for jump-starting people to have some form of a template to help people get started on packaging.
Since what's needed is fairly minimal this could probably be just a directory that has the basic structure already there. But it might be nicer to have something a little bit smarter, akin to a lein-new template. It feels wrong to require lein to be installed just to take advantage of the template though...
Would anyone be up for packaging PouchDB?
Source:
https://github.com/pouchdb/pouchdb/releases/download/3.2.1/pouchdb-3.2.1.js
Min:
https://github.com/pouchdb/pouchdb/releases/download/3.2.1/pouchdb-3.2.1.min.js
I have successfully used an autogenerated externs file before. That was quite some time ago, though.
Also, I just had a look at the license (Apache). It allows for redistribution, but requires the license text to be redistributed as well. How do other libraries deal with that? Will boot include that in the jar by itself?
In advanced mode the hammer.js file that ends up being packaged refers to a non existing source map file.
It is an issue as the source map file does not exist and its relative path is hardcoded. Even so it was successfully resolved by your web server I believe it would break anyway as line offset would be wrong (see some related nodejs tool).
Finally this is probably something we want to have configurable.
For now I would suggest to just strip source map references from js files.
I did my first clojar deploy to release fixed-data-table but I'm having some trouble using it. I'm wondering if anyone can see something obviously wrong.
This is a demo project which I'm using to test:
https://github.com/ul/fixed-data-table-demo
When I run "boot package build-jar install" and use a locally installed version it works.
When I use "lein cljsbuild once" using the package from clojars it fails with this error:
Caused by: clojure.lang.ExceptionInfo: No such namespace: cljsjs.fixed-data-table, could not locate cljsjs/fixed_data_table.cljs at line 1 src/fixed_data_table_demo/core.cljs {:tag :cljs/analysis-error, :file "src/fixed_data_table_demo/core.cljs", :line 1, :column 1}
This is the package on clojars:
https://clojars.org/cljsjs/fixed-data-table
Thanks, Oliver
Hi, I just updated my React dependencies from webjars to cljsjs and noticed that there is no React.addons.Perf
anymore. Why is that? Should I include it on my own?
Hello,
It would be nice to add React Bootstrap
Hello,
i'm packaging this utility library for google maps:
https://github.com/printercu/google-maps-utility-library-v3-read-only
The code there is split up in many files, is there a task or common way to concatenate all the js file into one?
Because when I just copy them all in cljsjs/production and cljsjs/development and do build-jar, then later when i require the packkage in closurscript only one js file gets loaded actually loaded.
I've got a branch started for Leaflet here, however I'm having trouble with the sift
step of the packaging process.
Leaflet comes pre-built in a leaflet-0.7.3.zip
which looks like this when unzipped:
.
├── images
│ ├── layers-2x.png
│ ├── layers.png
│ ├── marker-icon-2x.png
│ ├── marker-icon.png
│ └── marker-shadow.png
├── leaflet-src.js
├── leaflet.css
└── leaflet.js
So I was thinking that my sift
task should look like this:
(sift :move {#"leaflet\.js" "cljsjs/production/leaflet.js"
#"leaflet-src\.js" "cljsjs/development/leaflet-src.js"
#"leaflet\.css" "cljsjs/common/leaflet.css"
#"images" "cljsjs/common/images"
})
(sift :include #{#"^cljsjs"})
However when I run that I get a java.lang.IllegalArgumentException: No implementation of method: :path of protocol: #'boot.tmpdir/ITmpFile found for class: nil
. I don't understand what this means but I assume this means that I'm not properly matching the filename? I manually created cljsjs/{production,development,common}
but that didn't solve it either.
Slightly related question, what is the best workflow for creating these packages? Is it to do the download
, sift
, and deps-cljs
tasks from the repl and then copy into build.boot
? I have the full workflow figured out from the command line with curl
and unzip
and whatnot, but not from the repl.
Once I get leaflet packaged I can package mapbox because mapbox depends on leaflet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.