I am using Node and Grunt to watch files and compile my stylus css preprocessor code. Node is otherwise not necessary for this project.
Right now the node_modules folder is not checked into my git repository which is fine for release. The problem I have is whenever I create a feature branch, node_modules is not there and I can't watch or compile my stylus files.
Is there a way for node_modules to appear in new branches without adding them to .git? I'd rather not do an npm install on every new branch.
Or is it best practice to add node_modules to git?
If I'd like to add them to git, should I add node_modules as a git submodule? If adding as a submodule, what url should be specified if any?
The best discussion I've seen about a similar situation is here.