Synced local dependencies


(B.E.) #1

Hi. I’m using wml instead of npm link to sync and consolidate dependencies into node_modules because

  • Docker can’t use symlinks outside of it’s build context
  • React Native (Metro) has symlink issues

There’s a few issues with it. Synced dependencies

  • aren’t listed in package.json
  • are removed with subsequent use of npm i, etc

Is there any solution to this already? Or could there be something like

“synced-local-dependency”: “synced”,
“synced-local-dependency”: “local”,
“synced-local-dependency”: “*”,
“synced-local-dependency”: “0.0.0”

that would let synced dependencies be listed in package.json, as well as avoid them being removed?

Beyond that, what if NPM had a sync feature? Something like “sync:/path”, where it synced a local path. Something like

  • npm copy (one-off)
  • npm sync (watch, maybe with option of passing an interval)

or similar.

Thanks!