EGamalielGZ
EGamalielGZ•2w 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
TheSadMidDeveloper
TheSadMidDeveloper•2w ago
Would love to know this as well
marvinh.
marvinh.•2w ago
What happens when you publish it. Are you getting an error?
TheSadMidDeveloper
TheSadMidDeveloper•2w 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.•2w ago
Running deno publish in the root folder should work
EGamalielGZ
EGamalielGZ•2w 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
TheSadMidDeveloper
TheSadMidDeveloper•2w 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.•2w ago
I think right now both would be published
EGamalielGZ
EGamalielGZ•2w 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