node execute local bin 1

node execute local bin

# in your .zshrc or .bashrc:
function npm-do { (PATH=$(npm bin):$PATH; eval $@;) }
# restart zsh of course
# inside your project directory:
npm-do tsc --init
npm-do figlet hi # or whatever

Here is what the above code is Doing:
1. It’s creating a function called npm-do.
2. It’s setting the PATH variable to include the npm bin directory.
3. It’s running the command you pass to npm-do.

The npm bin directory is where npm installs executables.

So, if you run npm install -g typescript, npm will install the tsc executable in the npm bin directory.

If you run npm install typescript, npm will install the tsc executable in the node_modules/.bin directory.

The npm bin directory is always the first directory in the PATH.

So, if you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

If you run npm-do tsc, it will run the tsc executable in the npm bin directory.

If you run npm-do figlet, it will run the figlet executable in the npm bin directory.

Similar Posts