Fork me on GitHub
#nbb
<
2022-06-02
>
Chris McCormick02:06:15

@raymcdermott you can also upgrade to the latest version like this: npm install [email protected] -g

Chris McCormick02:06:01

you can make your node deps work per project by doing echo {} > package.json and then dropping the -g from the npm install command.

borkdude21:06:50

If there's anything missing in nbb right now from the google closure libraries, this is how you can still access it:

[email protected] /tmp/goog $ npm install google-closure-library
[email protected] /tmp/goog $ nbb
Welcome to nbb v0.5.103!
user=> (require '["google-closure-library"])
nil
user=> (js/goog.require "goog.crypt.Sha1")
nil
user=> (def sha1 (new js/goog.crypt.Sha1))
#'user/sha1
user=> (.update sha1 "foobar")
nil
user=> (def hash (.digest sha1))
#'user/hash

😍 2
👍 2