【文件属性】:
文件名称:is-installed-globally:检查您的软件包是否已全局安装
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-26 07:55:10
JavaScript
已全局安装
检查您的软件包是否已全局安装
如果您的CLI在全局和本地安装时需要不同的行为,可能会很有用。
安装
$ npm install is-installed-globally
用法
const isInstalledGlobally = require ( 'is-installed-globally' ) ;
// With `npm install your-package`
console . log ( isInstalledGlobally ) ;
//=> false
// With `npm install --global your-package`
console . log ( isInstalledGlobally ) ;
//=> true
有关的
导入全局安装的模块
global-解决全局安装模块的路径
获取全局安装的软件包和二进制文件的目录
【文件预览】:
is-installed-globally-main
----index.test-d.ts(118B)
----.gitattributes(19B)
----.github()
--------funding.yml(91B)
--------workflows()
----test.js(2KB)
----license(1KB)
----index.d.ts(379B)
----fixture()
--------cli.js(131B)
--------package.json(144B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(342B)
----readme.md(828B)
----package.json(940B)