Fork me on GitHub
#klipse
<
2016-12-19
>
dialelo11:12:26

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

dialelo11:12:21

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

dialelo11:12:01

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

Yehonathan Sharvit12:12:10

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

dialelo12:12:03

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

Yehonathan Sharvit12:12:34

Oh @dialelo it’s your lucky day

Yehonathan Sharvit12:12:53

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

Yehonathan Sharvit12:12:04

The trick with foreign libs is to:

Yehonathan Sharvit12:12:27

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

Yehonathan Sharvit12:12:19

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

Yehonathan Sharvit12:12:37

Please confirm that it works also with your use case

dialelo12:12:18

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

dialelo12:12:02

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

Yehonathan Sharvit12:12:54

For the moment no.

Yehonathan Sharvit12:12:54

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 Sharvit12:12:12

I thought you were using asciidoctor