cljsjs

Yehonathan Sharvit 2017-01-01T05:40:08.000286Z

I’d like to integrate cljsjs into klipse

Yehonathan Sharvit 2017-01-01T05:40:29.000287Z

For that I need to have a better understanding of how cljsjs works

Yehonathan Sharvit 2017-01-01T05:40:47.000288Z

My biggest question is: where are the js files located actually?

martinklepsch 2017-01-01T05:41:28.000290Z

You can inspect the contents of jars using jar tf path/to.jar, that should help answering your question

Yehonathan Sharvit 2017-01-01T05:45:33.000291Z

ok. that was useful

Yehonathan Sharvit 2017-01-01T05:45:46.000292Z

For klipse, I need the js files to be hosted somewhere

Yehonathan Sharvit 2017-01-01T05:46:17.000293Z

One solution would be to host the content of the jar in some github-pages repo

Yehonathan Sharvit 2017-01-01T05:47:06.000294Z

Only the production files

Yehonathan Sharvit 2017-01-01T06:32:16.000295Z

@martinklepsch what is the rule for the full filename inside the jar?

martinklepsch 2017-01-01T06:52:30.000296Z

@viebel depends on prod vs dev file and some other things

martinklepsch 2017-01-01T06:52:41.000297Z

but usually something like this:

martinklepsch 2017-01-01T06:53:14.000298Z

/cljsjs/{project-name}/{production,development}/{project-name}.inc.js

Yehonathan Sharvit 2017-01-01T06:53:27.000299Z

ok

Yehonathan Sharvit 2017-01-01T06:53:32.000300Z

this is what I guessed

Yehonathan Sharvit 2017-01-01T06:53:38.000301Z

But sometimes I see also common

martinklepsch 2017-01-01T06:53:52.000302Z

that’s for things like CSS files and externs

Yehonathan Sharvit 2017-01-01T06:54:25.000303Z

what about cljsjs/codemirror/common/mode/diff.inc.js?

Yehonathan Sharvit 2017-01-01T06:54:37.000304Z

I think it’s a regular js file

martinklepsch 2017-01-01T06:55:20.000305Z

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

martinklepsch 2017-01-01T06:55:33.000306Z

but codemirror really isn’t the rule.

martinklepsch 2017-01-01T06:55:52.000307Z

Probably one of the most complex packages on CLJSJS

martinklepsch 2017-01-01T06:57:53.000308Z

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

Yehonathan Sharvit 2017-01-01T07:04:41.000309Z

I’d like to mirror its contents

Yehonathan Sharvit 2017-01-01T07:05:18.000310Z

The solution I’m thinking of is to have a github repo with a project.clj that includes all the cljsjs packages

Yehonathan Sharvit 2017-01-01T07:05:42.000311Z

And I’ll write a script that add the contents of the packages in a folder

Yehonathan Sharvit 2017-01-01T07:05:54.000312Z

and I’ll host all this stuff on gh-pages

Yehonathan Sharvit 2017-01-01T07:06:00.000313Z

What do u think @martinklepsch ?

martinklepsch 2017-01-01T07:15:29.000314Z

Sounds reasonable

Yehonathan Sharvit 2017-01-01T07:29:59.000315Z

OK. here is the repo @martinklepsch https://github.com/viebel/cljsjs-hosted

Yehonathan Sharvit 2017-01-01T07:30:09.000317Z

Could you please review my strategy 🙂

martinklepsch 2017-01-01T08:24:44.000318Z

@viebel seems fine 👍

martinklepsch 2017-01-01T08:25:14.000319Z

I’m not a fan of having vendor source code in git but ¯\(ツ)

Yehonathan Sharvit 2017-01-01T08:28:20.000320Z

Do you know if there is a way to open a JAR with javascript code in the browser?

martinklepsch 2017-01-01T08:29:54.000321Z

Don’t know but I guess there is some way. Afaik, Jars are mostly just zip files

pupeno 2017-01-01T13:13:44.000329Z

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?