EGamalielGZ
EGamalielGZ•6mo ago

How to publish in JSR a library with workspaces?

I'm developing a hooks library from preact and react which a have a "common"/core library. I want to know how to publish the preact and react library in jsr.
8 Replies
Donald Biden
Donald Biden•6mo ago
Would love to know this as well
marvinh.
marvinh.•6mo ago
What happens when you publish it. Are you getting an error?
Donald Biden
Donald Biden•6mo ago
Ah I think what he meant is publishing if youre in the root folder for example 👀 You can do something like
deno task --cwd=packages/core release
deno task --cwd=packages/core release
release script is something like deno publish in your core package for example
marvinh.
marvinh.•6mo ago
Running deno publish in the root folder should work
EGamalielGZ
EGamalielGZOP•6mo ago
I haven't done anything, I'm still developing the library. What I want to do is to be able to publish the libraries, that are on their own workspace, that have a common package. Checking the deno std library I see you were right, by executing deno publish in the root folder is enough
Donald Biden
Donald Biden•6mo ago
what if you have 2 apps in a workspace, the package and playground and you didnt want to publish playground. Would there be an additional setting?
marvinh.
marvinh.•6mo ago
I think right now both would be published
EGamalielGZ
EGamalielGZOP•6mo ago
I guess you don't have to add the name or version attributes in the deno.json to not publish it At least, that's what I understood with the documentation

Did you find this page helpful?