You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
We'd like to share a few specific Vue components or .js files between multiple projects, front-end and backend (nodejs). Backend is published to a PaaS (Heroku).
Bit looks good, but it requires signup to another 3rd party service. We already use github & npm.
Could npm v7 workspaces handle this? How?
Would be great to
have these shared files in 1 place, and when changed all projects know about them
committing to github (used also for deploying to Heroku) would include a copy of the files, so the project can run on Heroku too or also when others check out and they don't have the shared set of folders/files
Thanks!
The text was updated successfully, but these errors were encountered:
A post on Workspaces is planned, and you can certainly use Workspaces for this use case, I'd imagine, though it'd be a little bit outside the target use case. Might be a bit too situation-specific for this blog series?
If you're comfortable using a monorepo, you could define your apps and all their shared deps as workspaces, so you'd have something like:
That would, of course, re-publish all of your applications any time you push an update to any of them, or to any shared deps, and you'd have to configure your PaaS to use a specific folder to run each application. But it would guarantee that things stay in sync. (And there'd be nothing stopping you from also publishing some or all of those shared deps as npm packages, of course.)
What / Why
We'd like to share a few specific Vue components or .js files between multiple projects, front-end and backend (nodejs). Backend is published to a PaaS (Heroku).
There are alternatives, none good:
https://www.smashingmagazine.com/2018/04/sharing-code-between-projects/
https://stackoverflow.com/questions/11278921/how-to-share-code-between-node-js-apps
(don't want to go through the hassle of publishing private modules)
Bit looks good, but it requires signup to another 3rd party service. We already use github & npm.
Could npm v7 workspaces handle this? How?
Would be great to
Thanks!
The text was updated successfully, but these errors were encountered: