CherryMace / melvor-mod-manager

A tool to allow for quick injection of userscripts and browser extensions into the Steam edition of Melvor Idle
https://CherryMace.github.io/melvor-mod-manager/
MIT License
41 stars 8 forks source link

Git repository support #7

Closed mazunki closed 2 years ago

mazunki commented 2 years ago

I added git repository support to the Add From URL option. Currently updates are not implemented automatically, but git pull in the git repository should do it.

Manifest files can also use proper WebExtension scripts now, if those exist. Legacy support (entryScript) is maintained.

Should we consider refactoring src/modsHandler.js entirely? It feels kind of messy, mostly regarding naming conventions.

mazunki commented 2 years ago

Also, I removed package-lock.json, since it's not used by npm by default, removing 15k lines of code. Don't be startled by that. I gitignored some other files too.

mazunki commented 2 years ago

This should probably go in a README somewhere, but, uh, it's expected that the manifest.json files include an id value corresponding with the target directory for the mod repository. For git repositories I've set this to user_repositoryname, to avoid naming conflicts. The reason for this is that we don't have access to the manifest.json until after we clone the repository... at which point it's "too late" to move the directory.