jsdelivr / libgrabber

DEPRECATED Keeps projects hosted in jsDelivr updated
20 stars 21 forks source link

Add support for indexs and ftp #46

Open megawac opened 9 years ago

megawac commented 9 years ago

As discussed on Gitter, I think it'd be useful to add support for ftp and file indexs. For example, see angular's index.

Could make managing pull requests like this https://github.com/jsdelivr/jsdelivr/pull/5335 significantly easier via auto-update.

/cc @jimaek @UnbounDev

as-com commented 9 years ago

How about zip/tar.gz files attached to GitHub releases, like https://github.com/Khan/KaTeX/releases?

megawac commented 9 years ago

How would you propose pathing those in the update.json?

On Sun, Jun 21, 2015 at 8:36 PM, Andrew Sun notifications@github.com wrote:

How about zip/tar.gz files attached to GitHub releases, like https://github.com/Khan/KaTeX/releases?

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/libgrabber/issues/46#issuecomment-113972589.

as-com commented 9 years ago

Maybe like this:

{
  "packageManager": "github-release",
  "name": "katex",
  "repo": "khan/katex",
  "files": {
    "archive": "katex.zip",
    "basePath": "katex/",
    "exclude": ["README.md"]
  }
}
tomByrer commented 9 years ago

How about zip/tar.gz files attached to GitHub releases

I don't understand why you want those? They contain the entire repo; README, .gitignore, etc. Alot of useless files...

megawac commented 9 years ago

@as-com why can't we define KaTex by dist/? https://github.com/Khan/KaTeX/tree/v0.4.3/dist @tomByrer the zip file is often contains a custom set of zipped files, pre-built. I think hogan.js used to distribute their files that way

tomByrer commented 9 years ago

^ seems like a better idea...

as-com commented 9 years ago

Oh, apparently they just added that! Pull request coming when I'm at my computer...

The indexes and FTP idea seems good. On Mon, Jun 22, 2015 at 12:23 AM Tom Byrer notifications@github.com wrote:

^ seems like a better idea...

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/libgrabber/issues/46#issuecomment-113997203.

jimaek commented 9 years ago

@megawac How easy is it to implement? The code will only work for angular or multiple projects supporting the same structure?

megawac commented 9 years ago

Any project using that sort of structure, it's somewhat common and is just a simple webserver directory index. FTP should be essentially the same though I can't think of any FTP hosted JS projects

jimaek commented 9 years ago

Well if its very simple to do then sure. What kind of update.json format do you imagine? Most existing options wont work

megawac commented 9 years ago

I was imagining

{ "packageManager": "<github|npm|bower|index|ftp>", "name": "", "repo": "",

On Mon, Jun 22, 2015 at 11:30 AM, Dmitriy Akulov notifications@github.com wrote:

Well if its very simple to do then sure. What kind of update.json format do you imagine? Most existing options wont work

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/libgrabber/issues/46#issuecomment-114154739.

jimaek commented 9 years ago

There is no need for ftp. For index we basically use repo as the URL to https://code.angularjs.org/ and thats it?

megawac commented 9 years ago

Yeppers

On Mon, Jun 22, 2015 at 11:36 AM, Dmitriy Akulov notifications@github.com wrote:

There is no need for ftp. For index we basically use repo as the URL to https://code.angularjs.org/ and thats it?

— Reply to this email directly or view it on GitHub https://github.com/jsdelivr/libgrabber/issues/46#issuecomment-114156247.

jimaek commented 9 years ago

Ok lets do it then. I believe Angularjs is worth it