Forking and cloning GitHub repositories: how to make relative repository/file URLs in mip's package.json? #11752
Unanswered
ned-pcs
asked this question in
Libraries & Drivers
Replies: 2 comments
-
|
OK: Here's a POC that allows for relative URLs in |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
And submitted as a PR here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I like the work that has been done with
mipbut recently ran into an issue that made me consider digging intomip(or opening an issue) to change how it operates with respect to loading fromgithub:URLs.I'd forked a repository, and wanted to be able to test
mipinstallation from my own repository but still issue pull requests to the upstream repository.The problem is that the
package.jsoncontained absolutegithub:URLs to the files that were part of the installable package. That is: each of the files had entries like this:but to install from my own fork I needed entries like this:
To test installing from my fork, I would need to edit the
package.jsonin a branch that existed merely for testing installation from GitHub. And I would have to rebase that branch after every commit to test again.What would have been ideal is to have had some way to express file locations relative to the
package.jsonitself.This way:
package.jsonon my local filesystem (using the unix port) these source URLs would refer to local files in the same treewithout having to edit the
package.jsonmerely because I made a fork or did agit checkoutof a repositoryMaybe I've missed something in how
mipworks (I suppose I should test this). If someone could explain how to make apackage.jsonthat doesn't need to be edited to survivegit cloneorgit checkout, I'd be glad to add that explanation to themipdocumentation.As an aside, my experience with package installers includes writing one 20 years or so ago for Squeak Smalltalk. This used Zip files to package source code and resources (see here for a discussion).
Beta Was this translation helpful? Give feedback.
All reactions