I’d like to integrate cljsjs into klipse
For that I need to have a better understanding of how cljsjs works
My biggest question is: where are the js files located actually?
You can inspect the contents of jars using jar tf path/to.jar
, that should help answering your question
ok. that was useful
For klipse, I need the js files to be hosted somewhere
One solution would be to host the content of the jar in some github-pages repo
Only the production files
@martinklepsch what is the rule for the full filename inside the jar?
@viebel depends on prod vs dev file and some other things
but usually something like this:
/cljsjs/{project-name}/{production,development}/{project-name}.inc.js
ok
this is what I guessed
But sometimes I see also common
that’s for things like CSS files and externs
what about cljsjs/codemirror/common/mode/diff.inc.js
?
I think it’s a regular js file
codemirror is a bit special since it has so many extensions, these are in common
because they don’t exist in minified/non-minified versions I think
but codemirror really isn’t the rule.
Probably one of the most complex packages on CLJSJS
Now that Clojars is on a CDN, maybe they’ll add a way to “reach into jars” and download individual files but until then you’ll need to download the entire jar or mirror its contents somewhere
I’d like to mirror its contents
The solution I’m thinking of is to have a github repo with a project.clj
that includes all the cljsjs
packages
And I’ll write a script that add the contents of the packages in a folder
and I’ll host all this stuff on gh-pages
What do u think @martinklepsch ?
Sounds reasonable
OK. here is the repo @martinklepsch https://github.com/viebel/cljsjs-hosted
Could you please review my strategy 🙂
@viebel seems fine 👍
I’m not a fan of having vendor source code in git but ¯\(ツ)/¯
Do you know if there is a way to open a JAR with javascript code in the browser?
Don’t know but I guess there is some way. Afaik, Jars are mostly just zip files
I’m trying to package react-toolbox but it doesn’t seem to have a way to compile all javascript into a single file or compile sass into css at all. It seems to rely on you having webpack. Am I missing something here?