https://github.com/dishait/autoinstall-pkg
自动安装 npm 包
https://github.com/dishait/autoinstall-pkg
autoinstall npm pkg typescript
Last synced: 12 months ago
JSON representation
自动安装 npm 包
- Host: GitHub
- URL: https://github.com/dishait/autoinstall-pkg
- Owner: dishait
- License: mit
- Created: 2022-05-28T09:53:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T08:15:45.000Z (almost 2 years ago)
- Last Synced: 2025-02-13T06:09:36.753Z (12 months ago)
- Topics: autoinstall, npm, pkg, typescript
- Language: TypeScript
- Homepage:
- Size: 95.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# autoinstall-pkg
自动安装 `npm` 包
## features 🦕
- 支持 `esmodule` 模块
- 支持 `npm`,`yarn` 和 `pnpm` 管理器
## Usage 🦖
### install
```shell
pnpm i autoinstall-pkg
```
### cli
```shell
aip -h
```
### program
```ts
import { autoInstallPkg } from "autoinstall-pkg"
autoInstallPkg() // 将扫描当前工作目录的 src 下的所有 ts 模块引入
```
```ts
// src/index.ts
import Koa from 'koa' // 引入模块不存在时将触发自动安装
```
## License
Made with [markthree](https://github.com/markthree)
Published under [MIT License](./LICENSE).