Browse code

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?).

Andrew Hodges authored on 28/05/2011 at 15:20:48
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+# This works if you installed node via homebrew.
1
+export NODE_PATH="/usr/local/lib/node"
2
+
3
+# Open the node api for your current version to the optional section.
4
+# TODO: Make the section part easier to use.
5
+function node-api {
6
+	open "http://nodejs.org/docs/$(node --version)/api/all.html#$1"
7
+}
0 8
new file mode 100644
... ...
@@ -0,0 +1,2 @@
0
+# TODO: Don't do this in such a weird way.
1
+export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/share/npm/bin:&|'`