https://github.com/midwayjs/detect-running-module
get modules from running code
https://github.com/midwayjs/detect-running-module
Last synced: over 1 year ago
JSON representation
get modules from running code
- Host: GitHub
- URL: https://github.com/midwayjs/detect-running-module
- Owner: midwayjs
- Created: 2021-02-12T14:34:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-28T16:44:03.000Z (over 4 years ago)
- Last Synced: 2025-02-14T19:36:21.475Z (over 1 year ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
Awesome Lists containing this project
README
# 获取运行时模块
探测运行时在 package.json 依赖中真实使用的模块,并和当前 package.json 做交集,用于获取实际的模块,方便前后端依赖分离。
## API
```js
const { getRunningDependencies } = require('detect-running-module');
const runnineModules = getRunningDependencies();
// output ['xxxx', 'xxxx']