Note about :scittle reader conditional. (#104)
This commit is contained in:
parent
f65ba9d853
commit
fc6c2a9643
|
@ -147,6 +147,19 @@
|
||||||
addition to <tt>scittle.js</tt>, you need to
|
addition to <tt>scittle.js</tt>, you need to
|
||||||
include <tt>scittle.pprint.js</tt>.
|
include <tt>scittle.pprint.js</tt>.
|
||||||
|
|
||||||
|
<a name="reader-conditional"></a>
|
||||||
|
<h2><a href="#reader-conditional">Target :scittle in cljc</a></h2>
|
||||||
|
You can target scittle in .cljc files (use a script tag to include the cljc file) with the <code>:scittle</code> reader conditional like this:<br>
|
||||||
|
|
||||||
|
<pre><code class="clojure">
|
||||||
|
#?(:scittle
|
||||||
|
(js/console.log "In scittle")
|
||||||
|
:org.babashka/nbb
|
||||||
|
(js/console.log "In nbb")
|
||||||
|
:cljs
|
||||||
|
(js/console.log "In cljs"))
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<a name="repl"></a>
|
<a name="repl"></a>
|
||||||
<h2><a href="#nrepl">REPL</a></h2>
|
<h2><a href="#nrepl">REPL</a></h2>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue