Closed steffenmllr closed 10 years ago
I was just looking for this ability too. Seems like you couldn't do this just with git due to security reasons (http://stackoverflow.com/questions/7196682/is-it-possible-to-clone-only-certain-commit-from-a-git-repo-with-depth-1). I would guess if you're looking for a tag you could get the zipped archive for the repo instead though (of course napa would have to be updated to do that, probably via #1).
+1
Napa has been great so far. But it just updated all my angular dependencies and broke everything :(
+1. This is the only thing that bothers me with napa. With this single feature I'll be able to ditch completely Bower (which really is just an inferior npm).
+1
As of 0.3.0
you can now download arbitrary urls or from github tagged releases:
{
"scripts": {
"install": "napa"
},
"napa": {
"foo": "username/repo#v1.2.3",
"bar": "https://example.com/downloads/release.tar.gz"
}
}
Currently for a lot of github releases, it will download and extract into a sub folder, node_modules/module/release-1.2.3/actualContents
. Let me know if that's an issue and I'll add some logic to detect and correct that.
This is hot !
The path may not be a problem for me, since I need to use the full path to use the lib downloaded with napa. Whether I include it directly in the browser or 'browserify' it, at first glance it's not a problem. Maybe for consistency's sake only.
Khalid aka DjebbZ @Dj3bbZ
Le 24 janv. 2014 à 18:52, Kyle Robinson Young notifications@github.com a écrit :
As of 0.3.0 you can now download arbitrary urls or from github tagged releases:
{ "scripts": { "install": "napa" }, "napa": { "foo": "username/repo#v1.2.3", "bar": "https://example.com/downloads/release.tar.gz" } } Currently for a lot of github releases, it will download and extract into a sub folder, node_modules/module/release-1.2.3/actualContents. Let me know if that's an issue and I'll add some logic to detect and correct that.
— Reply to this email directly or view it on GitHub.
Next step is branch and commit id.
Khalid aka DjebbZ @Dj3bbZ
Le 24 janv. 2014 à 18:52, Kyle Robinson Young notifications@github.com a écrit :
As of 0.3.0 you can now download arbitrary urls or from github tagged releases:
{ "scripts": { "install": "napa" }, "napa": { "foo": "username/repo#v1.2.3", "bar": "https://example.com/downloads/release.tar.gz" } } Currently for a lot of github releases, it will download and extract into a sub folder, node_modules/module/release-1.2.3/actualContents. Let me know if that's an issue and I'll add some logic to detect and correct that.
— Reply to this email directly or view it on GitHub.
@DjebbZ You should be able to reference a branch or commit with: user/repo#branch
and user/repo#347259472813400c7a982690acaa516292a8be40
.
Or just explicitly set the url: https://github.com/user/repo/archive/347259472813400c7a982690acaa516292a8be40.zip
Awesome. If these examples could end up in the README... PR may be coming soon ;)
Khalid aka DjebbZ @Dj3bbZ
Le 24 janv. 2014 à 20:14, Kyle Robinson Young notifications@github.com a écrit :
@DjebbZ You should be able to reference a branch or commit with: user/repo#branch and user/repo#347259472813400c7a982690acaa516292a8be40.
Or just explicitly set the url: https://github.com/user/repo/archive/347259472813400c7a982690acaa516292a8be40.zip
— Reply to this email directly or view it on GitHub.
Totally, patches welcome. :)
Would be great if I cloud do: