-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Installing from npm #519
Comments
Hi @RecuencoJones - thanks for taking the time to log this! This is an intriguing concept! I think this could make sense as yet another alternative for installing gomplate. Is there a reason that your PR is necessary? gomplate is distributed as a binary, not a tar archive. |
Yes! The PR is absolutely necessary to allow go-npm to download binaries without compression, currently it only supports downloading |
ahh - I misunderstood! Thanks 😉 I'll think about the best place for this. |
Let me know when you come up to a decision! Meanwhile I've created some automation scripts for publishing previous releases of gomplate to npm too in https://github.com/RecuencoJones/gomplate-npm/tree/feature/release-existing-versions |
Cool! I hope to get this dealt with this weekend ( |
@RecuencoJones ok! I've copied your I'll get a release pushed to https://www.npmjs.com/package/gomplate soon! |
Ok, https://www.npmjs.com/package/gomplate is published, and it seems to work as expected: $ npm i gomplate
> gomplate@3.3.1 postinstall /Users/hairyhenderson/tmp/node_modules/gomplate
> go-npm install
Downloading from URL: https://github.com/hairyhenderson/gomplate/releases/download/v3.3.1/gomplate_darwin-amd64-slim
Placed binary on /Users/hairyhenderson/tmp/node_modules/gomplate/node_modules/.bin/gomplate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN tmp@1.0.0 No description
npm WARN tmp@1.0.0 No repository field.
+ gomplate@3.3.1
added 68 packages from 62 contributors and audited 91 packages in 17.524s
found 0 vulnerabilities
$ ls -alh ./node_modules/gomplate/node_modules/.bin/gomplate
-rwxr-xr-x 1 hairyhenderson 5.7M Mar 24 14:12 ./node_modules/gomplate/node_modules/.bin/gomplate
$ ./node_modules/gomplate/node_modules/.bin/gomplate --version
gomplate version 3.3.1
$ du -sh node_modules
13M node_modules I gotta say, installing 68 packages and 13MBs just to get a single 5.7MB binary seems a bit overkill... But that's one of the reasons I switched from Node.js to Go years ago 😉 Anyway, it works! |
Thank you very much! 😄 |
We are using gomplate quite frequently for many purposes and sometimes for node/npm projects.
Not sure if you know https://www.npmjs.com/package/go-npm but is a really nice tool that allows JS devs to easily install go binary packages as npm modules (either for a project or globally).
Its current status does not allow downloading untarred files – although I'm working on that (sanathkr/go-npm#8).
Do you think it would be possible to publish this/do you want to host this in your GitHub account?
I created a small proof of concept if you want to check it:
The text was updated successfully, but these errors were encountered: