If your script command uses files that are in a different directory you can simply cd to the directory first, then run the commands.
An example would be:
cd /path/to/folder
npm install
If your script is within the repository then you can use the project golden parameters and then run the command.
An example would be:
cd %base_path%/custom-directory
npm install