Fork me on GitHub
Chris McCormick12:08:55

@borkdude what is great about nbb is that it is lightweight and fast to get it up and running. One can just npm i nbb and start. Does there exist yet anything like Wisp but using bb/sci? I mean so that you could do something like this:

<script src="bb.min.js"></script>

<script type="application/cljs">
(js/alert "Hello world!")

<!-- Load from a file: -->
<script type="application/cljs" src="my-script.cljs"></script>
The code that Wisp uses to find all <script> tags and run their code is here: All npm projects have their artifacts automatically available via CDNs so that would mean people could create a simple index.html file, load bb.min.js from CDN, and then put inline cljs code in there.

Chris McCormick12:08:14

Awesome. I will have to experiment with using this in Slingcode! Thanks!


@chris358 OK, please let me know if you run into issues, don't hesitate to report them

Chris McCormick12:08:33

Live reload on save works too. \o/


I now added an initial version of cljs.pprint to nbb. It's lazily loaded


$ nbb -e "(require '[cljs.pprint]) (cljs.pprint/pprint {:a {:b {:c {:d {:e (range 20)}}}}})"
  {:c {:d {:e (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)}}}}}