Fork me on GitHub
#cljsjs
<
2017-01-01
>
Yehonathan Sharvit05:01:08

I’d like to integrate cljsjs into klipse

Yehonathan Sharvit05:01:29

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

Yehonathan Sharvit05:01:47

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

martinklepsch05:01:28

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

Yehonathan Sharvit05:01:33

ok. that was useful

Yehonathan Sharvit05:01:46

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

Yehonathan Sharvit05:01:17

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

Yehonathan Sharvit05:01:06

Only the production files

Yehonathan Sharvit06:01:16

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

martinklepsch06:01:30

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

martinklepsch06:01:41

but usually something like this:

martinklepsch06:01:14

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

Yehonathan Sharvit06:01:32

this is what I guessed

Yehonathan Sharvit06:01:38

But sometimes I see also common

martinklepsch06:01:52

that’s for things like CSS files and externs

Yehonathan Sharvit06:01:25

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

Yehonathan Sharvit06:01:37

I think it’s a regular js file

martinklepsch06:01:20

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

martinklepsch06:01:33

but codemirror really isn’t the rule.

martinklepsch06:01:52

Probably one of the most complex packages on CLJSJS

martinklepsch06:01:53

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 Sharvit07:01:41

I’d like to mirror its contents

Yehonathan Sharvit07:01:18

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

Yehonathan Sharvit07:01:42

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

Yehonathan Sharvit07:01:54

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

martinklepsch07:01:29

Sounds reasonable

Yehonathan Sharvit07:01:09

Could you please review my strategy 🙂

martinklepsch08:01:14

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

Yehonathan Sharvit08:01:20

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

martinklepsch08:01:54

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

Pablo Fernandez13:01:44

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?