node.js - Batch file for running NPM if its not on your PATH -


i have requirement cannot add npm path variable. have bash script

#!/bin/bash  shopt -s expand_aliases alias npm-exec='path=$(npm bin):$path' npm-exec npm install npm-exec gulp 

which runs tasks , work. need know how accomplish same goal in batch file well. appreciated

i've accomplished doing following inside batch file:

set path=%appdata%\npm;%path% call npm install 

the first line prepends current user's roaming profile path path.

the second line requires call since npm .cmd, , without batch file exit prematurely right after call npm.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -