没有合适的资源?快使用搜索试试~ 我知道了~
import-cwd:像`require()`一样导入模块,但是要从当前工作目录中导入
共14个文件
js:3个
yml:2个
ts:2个
需积分: 9 0 下载量 23 浏览量
2021-05-26
07:55:47
上传
评论
收藏 5KB ZIP 举报
温馨提示
进口CWD 从当前工作目录导入与类似的模块 安装 $ npm install import-cwd 用法 const importCwd = require ( 'import-cwd' ) ; // Target module is at '/Users/sindresorhus/unicorn/foo.js' console . log ( __dirname ) ; //=> '/Users/sindresorhus/rainbow' console . log ( process . cwd ( ) ) ; //=> '/Users/sindresorhus/unicorn' const foo = importCwd ( './foo' ) ; 原料药 importCwd(moduleId) 像require() ,在找不到模块时引发。 importCwd.silent(
资源推荐
资源详情
资源评论
收起资源包目录
import-cwd-main.zip (14个子文件)
import-cwd-main
index.test-d.ts 81B
.gitattributes 19B
.github
funding.yml 91B
workflows
main.yml 450B
test.js 346B
license 1KB
index.d.ts 1KB
fixture
fixture.js 42B
.npmrc 19B
.editorconfig 175B
.gitignore 23B
index.js 204B
readme.md 1KB
package.json 718B
共 14 条
- 1
资源评论
秦风明
- 粉丝: 25
- 资源: 4732
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功