Created
November 22, 2011 17:51
-
-
Save joewalnes/1386357 to your computer and use it in GitHub Desktop.
NPM without NPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To find NPM dependencies, use http://search.npmjs.org/ | |
| NPM_DEPS += http://registry.npmjs.org/connect/-/connect-1.5.2.tgz | |
| NPM_DEPS += http://registry.npmjs.org/mime/-/mime-1.2.2.tgz | |
| NPM_DEPS += http://registry.npmjs.org/qs/-/qs-0.2.0.tgz | |
| NPM_DEPS += http://registry.npmjs.org/websocket-server/-/websocket-server-1.4.04.tgz | |
| node_modules: Makefile | |
| @rm -rf $@ | |
| @mkdir -p $@ | |
| @set -e; for DEP in $(NPM_DEPS); do \ | |
| ID=`echo $$DEP | sed -e 's|^.*/||;s|-[^-]*$$||'`; \ | |
| echo "Fetching NPM dependency $$ID <$$DEP>"; \ | |
| mkdir -p $@/$$ID; \ | |
| curl -L --silent $$DEP | tar xzf - --strip=1 --directory=$@/$$ID package; \ | |
| done | |
| @touch $@ | |
| clean: | |
| @rm -rf node_modules | |
| .PHONY: clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment