Last active
August 29, 2015 13:56
-
-
Save yurenju/9319829 to your computer and use it in GitHub Desktop.
This file contains 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
NODE_MODEULS_SRC?=modules.tar | |
ifdef NODE_MODULES_GIT_URL | |
NODE_MODULES_SRC := git-gaia-node-modules | |
endif | |
$(NODE_MODEULS_SRC): | |
ifeq "$(NODE_MODEULS_SRC)" "modules.tar" | |
$(DOWNLOAD_CMD) https://github.com/mozilla-b2g/gaia-node-modules/tarball/master | |
mv master "$(NODE_MODEULS_SRC)" | |
else | |
git clone "$(NODE_MODULES_GIT_URL)" "$(NODE_MODEULS_SRC)" | |
endif | |
node_modules: $(NODE_MODEULS_SRC) | |
ifeq "$(NODE_MODEULS_SRC)" "modules.tar" | |
$(TAR_WILDCARDS) --strip-components 1 -x -m -f $(NODE_MODEULS_SRC) "mozilla-b2g-gaia-node-modules-*/node_modules" | |
else | |
mv $(NODE_MODEULS_SRC)/node_modules node_modules | |
endif | |
npm install && npm rebuild | |
@echo "node_modules installed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment