klipse

2016-12-19T11:56:26.000161Z

i'm trying to make cuerdas self-host compatible for having interactive documentation with Klipse but I'm kind of stuck

2016-12-19T11:57:21.000162Z

it uses a foreign JS libs for its ClojureScript implementation, is it possible to add foreign JS libs and externs to Klipse?

2016-12-19T11:58:01.000163Z

sorry if dumb question, first time playing with self-hosted CLJS and Klipse

Yehonathan Sharvit 2016-12-19T12:09:10.000164Z

Excellent question @dialelo What is the name of the foreign lib?

2016-12-19T12:10:03.000165Z

its the xregexp library http://xregexp.com/

Yehonathan Sharvit 2016-12-19T12:20:34.000166Z

Oh @dialelo it’s your lucky day

Yehonathan Sharvit 2016-12-19T12:20:53.000167Z

I have made a demo page for interactive doc of cuerdas using klipse

Yehonathan Sharvit 2016-12-19T12:20:56.000168Z

Here is the page

Yehonathan Sharvit 2016-12-19T12:21:04.000169Z

The trick with foreign libs is to:

Yehonathan Sharvit 2016-12-19T12:21:27.000170Z

1. add the javascript source to the page in a <source> tag

Yehonathan Sharvit 2016-12-19T12:22:19.000171Z

2. insert a goog.provide statement after klipse script like this <script>goog.provide(‘cuerdas.vendor.xregexp’);</script>

Yehonathan Sharvit 2016-12-19T12:22:37.000172Z

Please confirm that it works also with your use case

Yehonathan Sharvit 2016-12-19T12:22:38.000173Z

ok?

2016-12-19T12:24:18.000174Z

thanks @viebel i will try that later today, i'm AFK right now

2016-12-19T12:25:02.000175Z

btw does the codox-klipse plugin support adding script tags?

Yehonathan Sharvit 2016-12-19T12:26:54.000176Z

For the moment no.

Yehonathan Sharvit 2016-12-19T12:27:54.000177Z

But it should be fairly easy to add via the codox html transformations. Take a look here https://github.com/weavejester/codox#html-transformations

Yehonathan Sharvit 2016-12-19T12:29:12.000180Z

I thought you were using asciidoctor

Yehonathan Sharvit 2016-12-19T12:36:33.000181Z

@dialelo ⬆️