posit-dev / publisher

MIT License
3 stars 0 forks source link

Setup npm workspaces for shared code #1291

Open dotNomad opened 5 months ago

dotNomad commented 5 months ago

To share non-CommonJS code, like TypeScript code, we need bundling first so this is on hold until https://github.com/posit-dev/publisher/issues/1289 is complete.


NPM workspaces will allow us to import packages in the repo into other packages for very easy code re-use and isolation. This work spurred out of the sharing of the api module and it having issues between VSCode and the standalone-UI. Keeping those the same is a challenge that a monorepo setup with npm workspaces solves in addition to allowing to create as many shared modules as we need.

dotNomad commented 5 months ago

Some helpful references:

dotNomad commented 5 months ago

sourcegraph is a good example of a monorepo with frontend and Go organization