vulcan-next
vulcan-next copied to clipboard
NPM_PACKAGE_DIRS to mimick a local package directory
Is your feature request related to a problem? Please describe. Mimick Meteor beloved METEOR_PACKAGE_DIRS feature in NPM.
- When this variable is set, Meteor will consider each directory listed as a registry package. It will fetch packages from there in priority, and fetch on Atmosphere otherwise
- When it is not set, it goes back to getting the packages from Atmosphere
- This behaviour happens at runtime => it means we would need a
vulcanCLI command (likevercel,blitzalready do for next)
Describe the solution you'd like
Run development mode like this:
NPM_PACKAGE_DIRS=<your-vulcan-npm-copy> vulcan dev
And so on for each next command that may rely on NPM packages.
Describe alternatives you've considered
yalcfor the setup. Commands are already documented in the docs.- See this ticket: https://github.com/wclr/yalc/issues/50. Yalc seems to also need an
installcommand afterward? To be confirmed. - https://github.com/google/zx for writing scripts easily in JS if we need to run commands? Or we might need a more cross-plateform alternative like https://www.npmjs.com/package/shelljs
-
- Verdaccio might be something to dig, as it spawns an actual NPM registry locally
Additional context
- More explanation about why we need this feature, with the example of React: https://github.com/facebook/react/issues/14257
- Meteor doc: https://docs.meteor.com/environment-variables.html