IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
290 stars 109 forks source link

Replace build script #262

Open ryantheleach opened 5 years ago

ryantheleach commented 5 years ago

Looking at the way the userscripts are structured, it should be theoretically possible to replace the build system with something debuggable in a standard JS ide.

Create a barebones proxy, that proxies all requests to ingress Intel, injecting the scripts instead of using tampermonkey extension.

Setup Hosts file redirection for Intel to localhost.

This should allow standard debugging, editing, and autoreloading that have come to be standard in modern web app dev.

ryantheleach commented 5 years ago

Holy shit, this exists already: https://github.com/eBay/userscript-proxy

johnd0e commented 5 years ago

Have you tried it already? Does it really allow us to use standard debugging, editing, autoreloading, etc?

ryantheleach commented 5 years ago

I'm yet to try it, I googled and discovered it while in bed dreaming.

Theoretically yes, as long as the scripts don't need to run outside the local/site context, which to my knowledge, no public iitc userscript does.

(i.e. they all use the plugin loading framework, which gets injected/eval'd into the page, and don't have a tampermonkey/greasemonkey script running in the extension context)

If you don't beat me to it, I'd be keen to experiment with it, converting the current tooling over to standard NPM instead of python. (should make multi-platform easier for windows too)

johnd0e commented 5 years ago

I'd prefer you to show simple proof-of-concept before changing build scripts.

ryantheleach commented 5 years ago

Another Alternative: https://github.com/agreenmamba/iitcp

HubertZhang commented 4 years ago

I've tried to build iitc using webpack in my fork, maybe you can check it.

Branch webpack of my fork