chocolatey-archive / chocolatey

[DEPRECATED - https://github.com/chocolatey/choco] Chocolatey NuGet - Like apt-get, but for windows.
https://chocolatey.org
Apache License 2.0
2.8k stars 344 forks source link

Chocolatey should support NPM as a package source. #338

Open AnthonyMastrean opened 11 years ago

AnthonyMastrean commented 11 years ago

It seems obvious to support NPM as a package source. We'd require nodejs.install to get the npm command line interface, like with webpi. The commands would be intuitive

> cinst foo -source npm

or

> cnpm foo

But, I do have some reservations...

If the above invalidates the idea, we should discuss an NPM helper. The command line should always include the global switch and the version when possible.

> npm install -g foo@version

Thoughts?

jmenchacavr commented 11 years ago

I think it is worth investigating, run through some use cases to see how it works out; right now it seems like it will add more problems. There's package managers that build things, then there's package managers that install things (with offline artifacts or downloaded off the Internet). Currently, in general, it feels that the building of things on Windows outside of .NET or outside of Cygwin is not so strong.

ferventcoder commented 11 years ago

I think NPM works well on WIndows...

AbhishekTripathi commented 11 years ago

This actually is a good idea. Command line tools are used "mostly" by developers. Chocolatey is a great utility but sometimes I am torn between chocolatey and npm. It might be a good idea to merge the two or allow chocolatey to install libraries from npm module catalog. NPM helper for chocolatey would be greatly appreciated.

Update: Chocolatey already has helpers for python, ruby etc in https://github.com/chocolatey/chocolatey/blob/master/src/functions/Chocolatey-Install.ps1

switch -wildcard ($source) 
  {
    "webpi" { Chocolatey-WebPI $packageName $installerArguments; }
    "windowsfeatures" { Chocolatey-WindowsFeatures $packageName; }
    "cygwin" { Chocolatey-Cygwin $packageName $installerArguments; }
    "python" { Chocolatey-Python $packageName $version $installerArguments; }
    "ruby" { Chocolatey-RubyGem $packageName $version $installerArguments; }
    default {Invoke-ChocolateyFunction "Chocolatey-Nuget" @($packageName,$source,$version,$installerArguments)}
  }
alexinslc commented 9 years ago

I created a pull request but the new version of Chocolatey is coming soon so it's not needed here just yet. However, I would like to know if it will be supported in the newer C# rewrite of Chocolatey....anyone?

gep13 commented 9 years ago

I guess I am on the fence with this one.

I see the benefit in using Chocolatey to install Node and NPM, but once installed, why would I use choco install gulp-imagemin -source npm, when I could just as easily do npm install gulp-imagemin. Now, don't get me wrong, the same could be said about installing ruby gems, but I think I am on the fence about this as well.

Other things like webpi, windowsfeatures, vsix, etc, make perfect sense to me. This, not so much. Happy to be persuaded otherwise though.

ferventcoder commented 9 years ago

I'm not really on the fence here. I think it would be one we would integrate with just fine. :)

chrisdostert commented 9 years ago

Absolutely do this +1.