{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/LibraryManager/issues/338","repository_url":"https://api.github.com/repos/aspnet/LibraryManager","labels_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/338/comments","events_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/338/events","html_url":"https://github.com/aspnet/LibraryManager/pull/338","id":346955369,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjkwNTEx","number":338,"title":"Add jsDelivr provider","user":{"login":"Drgy","id":11708560,"node_id":"MDQ6VXNlcjExNzA4NTYw","avatar_url":"https://avatars1.githubusercontent.com/u/11708560?v=4","gravatar_id":"","url":"https://api.github.com/users/Drgy","html_url":"https://github.com/Drgy","followers_url":"https://api.github.com/users/Drgy/followers","following_url":"https://api.github.com/users/Drgy/following{/other_user}","gists_url":"https://api.github.com/users/Drgy/gists{/gist_id}","starred_url":"https://api.github.com/users/Drgy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drgy/subscriptions","organizations_url":"https://api.github.com/users/Drgy/orgs","repos_url":"https://api.github.com/users/Drgy/repos","events_url":"https://api.github.com/users/Drgy/events{/privacy}","received_events_url":"https://api.github.com/users/Drgy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-02T10:37:15Z","updated_at":"2018-08-04T20:33:28Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/338","html_url":"https://github.com/aspnet/LibraryManager/pull/338","diff_url":"https://github.com/aspnet/LibraryManager/pull/338.diff","patch_url":"https://github.com/aspnet/LibraryManager/pull/338.patch"},"body":"Adds jsDelivr as a new provider, which supports pulling files from npm and GitHub.\r\n\r\nFeatures for npm packages:\r\n - name and version autocomplete (using existing NpmPackageSearch implementation)\r\n - file autocomplete (using [jsDelivr API](https://github.com/jsdelivr/data.jsdelivr.com))\r\n - support for [jsDelivr's on-demand minification feature](https://www.jsdelivr.com/features#minify) (a minified version is added to the list for any non-minified css/js file)\r\n\r\n```json\r\n{\r\n  \"version\": \"1.0\",\r\n  \"defaultProvider\": \"jsdelivr\",\r\n  \"libraries\": [\r\n    {\r\n      \"destination\": \"wwwroot/\",\r\n      \"library\": \"jquery@3.3.1\",\r\n      \"files\": [\r\n        \"dist/jquery.min.js\"\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nFeatures for GitHub repos:\r\n - version autocomplete for releases (using [jsDelivr API](https://github.com/jsdelivr/data.jsdelivr.com))\r\n - any commit hash may also be used as a version\r\n - file autocomplete for both releases and commits (using [jsDelivr API](https://github.com/jsdelivr/data.jsdelivr.com))\r\n - support for [jsDelivr's on-demand minification feature](https://www.jsdelivr.com/features#minify) (a minified version is added to the list for any non-minified css/js file)\r\n\r\n```json\r\n{\r\n  \"version\": \"1.0\",\r\n  \"defaultProvider\": \"jsdelivr\",\r\n  \"libraries\": [\r\n    {\r\n      \"destination\": \"wwwroot/\",\r\n      \"library\": \"jquery/jquery@3.3.1\",\r\n      \"files\": [\r\n        \"src/ajax.min.js\"\r\n      ]\r\n    },\r\n    {\r\n      \"destination\": \"wwwroot/\",\r\n      \"library\": \"ractivejs/ractive@8d33e5c787f683f91bb260df1d1ba175e2bad52c\",\r\n      \"files\": [\r\n        \"src/Ractive.js\"\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nThere were also a few things I'd have implemented differently but decided to do it the same way unpkg provider does for now. I'll be happy to change those in this or future PR if you think it's a good idea:\r\n - version autocomplete should probably use prefix-only matching\r\n - npm should support scoped packages\r\n - jsDelivr [file download stats](https://data.jsdelivr.com/v1/package/npm/jquery@3.2.1/stats) could be used to sort files - this would make autocomplete much more useful for packages with many files"},"comment":{"url":"https://api.github.com/repos/aspnet/LibraryManager/issues/comments/410475888","html_url":"https://github.com/aspnet/LibraryManager/pull/338#issuecomment-410475888","issue_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/338","id":410475888,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQ3NTg4OA==","user":{"login":"Drgy","id":11708560,"node_id":"MDQ6VXNlcjExNzA4NTYw","avatar_url":"https://avatars1.githubusercontent.com/u/11708560?v=4","gravatar_id":"","url":"https://api.github.com/users/Drgy","html_url":"https://github.com/Drgy","followers_url":"https://api.github.com/users/Drgy/followers","following_url":"https://api.github.com/users/Drgy/following{/other_user}","gists_url":"https://api.github.com/users/Drgy/gists{/gist_id}","starred_url":"https://api.github.com/users/Drgy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drgy/subscriptions","organizations_url":"https://api.github.com/users/Drgy/orgs","repos_url":"https://api.github.com/users/Drgy/repos","events_url":"https://api.github.com/users/Drgy/events{/privacy}","received_events_url":"https://api.github.com/users/Drgy/received_events","type":"User","site_admin":false},"created_at":"2018-08-04T20:33:28Z","updated_at":"2018-08-04T20:33:28Z","author_association":"NONE","body":"I updated everything based on your feedback."}}
{"actor":{"display_login":"Drgy"}}