This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-07
Channels
- # aleph (10)
- # announcements (6)
- # architecture (23)
- # atom-editor (2)
- # beginners (35)
- # biff (5)
- # cljdoc (22)
- # clojure (14)
- # clojure-europe (18)
- # clojure-hungary (26)
- # clojure-nl (6)
- # clojure-uk (6)
- # clojurescript (39)
- # core-async (1)
- # data-science (14)
- # datascript (20)
- # datomic (4)
- # graalvm (18)
- # jobs-discuss (5)
- # keechma (1)
- # leiningen (4)
- # malli (3)
- # nbb (11)
- # nextjournal (2)
- # off-topic (1)
- # parinfer (1)
- # releases (1)
- # remote-jobs (3)
- # shadow-cljs (7)
- # sql (2)
- # xtdb (4)
Working on a bundler thing, which should make #nbb scripts work better when packaging them up for e.g Github Actions and perhaps other things like vercel or so.
$ node ../../lib/nbb_main.js bundle example.cljs > out.mjs
$ ncc build out.mjs
$ node dist/index.mjs
:promesa2
:utils
hello
[6 {:columns 204, :rows 48}]
6
OK, please test, I will announce this later. https://github.com/babashka/nbb/tree/main/doc/bundle
Updated the nbb-action-example now to use the new nbb bundle
command:
https://github.com/borkdude/nbb-action-example
cc @delaguardo @cldwalker
@jayzawrotny Perhaps the bundle command will also help with the netlify stuff
Will need to experiment. It is capable of running nbb at runtime for serverless functions
I don't think so. It's about ready, will bump the version and create a pleasing test page.
OK, to finish off, I discovered one more nice thing about this bundle stuff. With webpack you can turn the .mjs (ESM) to normal .js https://github.com/babashka/nbb/tree/main/doc/bundle#webpack And then you can make that file executable, with a shebang and all that.
OK, one more cool thing. The webpack output can then be fed into pkg
to create a standalone executable:
https://github.com/babashka/nbb/tree/main/doc/bundle#pkg