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