Implantação de NPM privada com npm-reggie

Para NPMs privados, em vez de pagar a Gemfury US $ 9 / mês, basta configurar seu próprio servidor com npm-reggie

URL ?= http://fake.com
NAME_CMD
:= cat package.json | grep -m 1 -o '"name":s*"([^"])*"' | sed 's/"name":[^"]*"(.*)"$$/1/'
VERSION_CMD
:= cat package.json | grep -m 1 -o '"version":s*"([^"])*"' | sed 's/"version":[^"]*"(.*)"$$/1/'

publish
delete clean : PACKAGE_NAME:=$(shell ${NAME_CMD})
publish
delete : PACKAGE_VERSION:=$(shell ${VERSION_CMD})

clean
:
rm
-rf ./node_modules
rm
-rf ./${PACKAGE_NAME}*.tgz
rm
-rf *.log
rm
-rf .DS_STORE

pack
: clean
npm pack


publish
: clean delete
reggie
-u ${URL}/ publish

delete:
# npm --registry=${URL}/ unpublish ${PACKAGE_NAME}@${PACKAGE_VERSION} # Not supported yet...
curl
-X DELETE ${URL}/package/${PACKAGE_NAME}/${PACKAGE_VERSION}

.PHONY: clean pack delete publish

Basta digitar make publishquando deseja publicar seu pacote.