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
So, I had this idea it would be nice for contributors/early adopters to be able to depend directly on github repositories. Say I made a hack to fix something for react-native, but it's just a hack so it will never be a PR. Then, if each horizon component (client, server, cli) had their own github repo, so package.json is in the root, it's possible to use a github repo+branch as version in the app package.json. Eg. npm only allows Github dependencies if the package.json is in the root of the repo, and they have no plans of changing that.
Reason? A github dependency will work for testing on staging servers (eg Heroku etc), whereas a filesystem dependency won't, plus it's nice to have the code on Github.
For example, today I have to do something like this (see postinstall), pretty nasty:
In the next example I've created a new branch react-native-client where I deleted everything in the root of the project and moved everything in client/to the root. Now the clients package.json is in the root of the repo and I can use regular dependencies:
I get if you don't want to change the whole project structure just for this, but figured it was worth bringing it up. Are there other approaches? Git submodules?
Just an idea, feel free to close if it doesn't makes any sense.
The text was updated successfully, but these errors were encountered:
I think the monorepo concept is just incompatible with how npm wants to deal with github packages. Though I think we could do something like publish nightlies. Incidentally, the number of npm packages we have in the repo is about to shoot up a lot in the plugins release, so I think making them individual repositories isn't great for a few reasons. Not the least of which is that issues spread across multiple repositories is a huge pain
So, I had this idea it would be nice for contributors/early adopters to be able to depend directly on github repositories. Say I made a hack to fix something for react-native, but it's just a hack so it will never be a PR. Then, if each horizon component (client, server, cli) had their own github repo, so package.json is in the root, it's possible to use a github repo+branch as version in the app package.json. Eg. npm only allows Github dependencies if the package.json is in the root of the repo, and they have no plans of changing that.
Reason? A github dependency will work for testing on staging servers (eg Heroku etc), whereas a filesystem dependency won't, plus it's nice to have the code on Github.
For example, today I have to do something like this (see
postinstall
), pretty nasty:In the next example I've created a new branch react-native-client where I deleted everything in the root of the project and moved everything in
client/
to the root. Now the clients package.json is in the root of the repo and I can use regular dependencies:I get if you don't want to change the whole project structure just for this, but figured it was worth bringing it up. Are there other approaches? Git submodules?
Just an idea, feel free to close if it doesn't makes any sense.
The text was updated successfully, but these errors were encountered: