Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
299 views
in Technique[技术] by (71.8m points)

node.js - What is the purpose of .bin folder in node_modules?

Today one colleague explained me how to create nodejs projects and I notice that in ./node_modules there is an invisible folder named .bin. I must said that I discovered this after adding to the project "bootcamp" and "bower" tools. What's .bin purpose? What is it created for?

question from:https://stackoverflow.com/questions/25306168/what-is-the-purpose-of-bin-folder-in-node-modules

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

That is a folder where binaries (executables) from your node modules are located.

NPM site states:

Executables When in global mode, executables are linked into {prefix}/bin on Unix, or directly into {prefix} on Windows.

When in local mode, executables are linked into ./node_modules/.bin so that they can be made available to scripts run through npm. (For example, so that a test runner will be in the path when you run npm test.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...