今天一位同事向我解释了如何创建 nodejs 项目,我注意到在 ./node_modules 中有一个名为 .bin 的不可见文件夹。我必须说,我在添加到项目“bootcamp”和“bower”工具后发现了这一点。 .bin 的目的是什么?它是为了什么而创建的?
最佳答案
这是您的 Node 模块中的二进制文件(可执行文件)所在的文件夹。
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.)
关于node.js - node_modules 中 .bin 文件夹的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25306168/