How to publish notebook as /{package} instead of /{user}/{id}


#1

How do I publish a notebook using the url that npmjs.org links to (in the form of “/{package}”) instead of “/{user}/{id}”?

For example, https://npm.runkit.com/lodash has example code using the lodash npm package. When I navigate to the same url but substittute lodash for one of my packages the only code there is importing the package (which looks to be the default).

I don’t see a way to publish as /{package name} I only see a way to publish as /{user name}/{notebook id}


#2

Hi stewie1570,

You actually publish packages like that through npm using their CLI tool. If you have npm on your local machine, you put the code in a folder and do npm publish from the command line.

We’re considering allowing you to publish notebooks to npm with a one-click button (as you mentioned, we might provide that option from the same publish panel). Sorry it doesn’t work that way today!