Skip to content

Instantly share code, notes, and snippets.

@monolithed
Last active December 15, 2015 01:59
Show Gist options
  • Save monolithed/5183647 to your computer and use it in GitHub Desktop.
Save monolithed/5183647 to your computer and use it in GitHub Desktop.

Вместо:

git clone [email protected]:mailru/fest.git
cd fest
sudo npm install -g grunt-cli
npm install
grunt

Вариант 1:

Писать:

git clone --recursive [email protected]:mailru/fest.git

Для этого нужно лишь добавить:

.gitmodules
[submodule "node_modules/grunt-cli"]
  path = node_modules/grunt-cli
	url = git://github.com/gruntjs/grunt-cli.git

Обновляем потом так:

git submodule foreach git pull origin master

Или так ( git 1.7.3+):

git pull --recurse-submodules
git submodule update --recursive

Вариант 2:

package.json
"scripts": {
    "preinstall": "git submodule update --init --recursive && ./configure"
},
"dependencies" : { 
   "grunt-cli":"*" 
}
// ....
.configure
cd npm_modules;

for i in $(ls -d -- */)
	do
		npm install -g $i | sed s/.$//;
	done;

cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment