How to use package installed locally in node_modules?
How to use package installed locally in node_modules?
YOU can get the path of locally installed binaries with
npm bin
To execute a locally installed Eg: backtopjs binary independent of where you are in the project directory hierarchy you can use this bash construct
PATH=$(npm bin):$PATH backtopjs
you can also aliased this to npm-exec
alias npm-exec='PATH=$(npm bin):$PATH'
So, now you can
npm-exec backtopjs
to run the correct copy of backtopjs no…
View On WordPress








