Node.js Helpers
Add helper function to open node api in browser. Add binaries installed via
npm to path. Tell node where to find things (what things?).
Diff
1diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..18f35333ccd510dfbb8d62058a5b28b2fc3c01f2
4--- /dev/null
5+++ b/plugins/node/node.plugin.zsh
6@@ -0,0 +1,8 @@
7+# This works if you installed node via homebrew.
8+export NODE_PATH="/usr/local/lib/node"
9+
10+# Open the node api for your current version to the optional section.
11+# TODO: Make the section part easier to use.
12+function node-api {
13+ open "http://nodejs.org/docs/$(node --version)/api/all.html#$1"
14+}
15diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh
16new file mode 100644
17index 0000000000000000000000000000000000000000..0b0a30e114072931782379c14eca74f527c96ea6
18--- /dev/null
19+++ b/plugins/npm/npm.plugin.zsh
20@@ -0,0 +1,2 @@
21+# TODO: Don't do this in such a weird way.
22+export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/share/npm/bin:&|'`