Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
deprecate legacy npm support
Browse files Browse the repository at this point in the history
  • Loading branch information
phlipper committed Jun 29, 2013
1 parent 09d3797 commit ea7ca4b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ The following platforms are supported by this cookbook, meaning that the recipes
* `nodejs::npm` - Install `npm`. _NOTE: `node.js-legacy` only_


## Attributes

```ruby
default["nodejs"]["legacy"] = false # enable legacy npm support
```


## Usage

This cookbook installs the Node.js components if not present, and pulls updates if they are installed on the system.
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
default["nodejs"]["legacy"] = false # enable legacy npm support
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version "1.6.0"

recipe "nodejs", "Sets up the apt repository and installs dependent packages"
recipe "nodejs::npm", "Install npm"
recipe "nodejs::npm", "Install npm [DEPRECATED]"

depends "apt", ">= 1.4.4"

Expand Down
10 changes: 0 additions & 10 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
keyserver "keyserver.ubuntu.com"
action :add
end


apt_repository "chris-lea-node.js-legacy" do
uri "http://ppa.launchpad.net/chris-lea/node.js-legacy/ubuntu"
distribution node["lsb"]["codename"]
components ["main"]
key "C7917B12"
keyserver "keyserver.ubuntu.com"
action :add
end

when "debian"

Expand Down
18 changes: 16 additions & 2 deletions recipes/npm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
# Recipe:: npm
#

include_recipe "nodejs"

package "npm"
if node["nodejs"]["legacy"]

include_recipe "nodejs"

apt_repository "chris-lea-node.js-legacy" do
uri "http://ppa.launchpad.net/chris-lea/node.js-legacy/ubuntu"
distribution node["lsb"]["codename"]
components ["main"]
key "C7917B12"
keyserver "keyserver.ubuntu.com"
action :add
end

package "npm"

end

0 comments on commit ea7ca4b

Please sign in to comment.