Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smartlook/circular-deps-detector
Package to detect circular dependencies and unused files in typescript projects
https://github.com/smartlook/circular-deps-detector
Last synced: about 1 month ago
JSON representation
Package to detect circular dependencies and unused files in typescript projects
- Host: GitHub
- URL: https://github.com/smartlook/circular-deps-detector
- Owner: smartlook
- License: mit
- Created: 2023-08-17T09:06:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-21T12:41:56.000Z (over 1 year ago)
- Last Synced: 2024-12-14T05:33:25.088Z (about 1 month ago)
- Language: TypeScript
- Size: 29.3 KB
- Stars: 1
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Installation
NPM
```
npm i @smartlook/circular-deps-detector
```YARN
```
yarn add @smartlook/circular-deps-detector
```PNPM
```
pnpm add @smartlook/circular-deps-detector
```### Usage
Add this line to your scripts in `package.json`
```
"detect-circular-deps": "detect-circular-deps --config ./circular-deps-config.json"
```Then create a new JSON file `circular-deps-config.json` with the following content:
| Property | Type | Description |
| ---------------- | ------------------- | ----------------------------------------------------------------------- |
| `projectName` | string | Your project name |
| `rootDir` | string | root directory to scan |
| `tsConfig` | string | path to your TS config file |
| `entryPoint` | string | path to the entry point file |
| `outputFile` | string | path to output report file (JSON) |
| `ignorePatterns` | string[] (optional) | array of regexp patterns (valid parameter of JavaScript `new RegExp()`) |Example:
```
{
"projectName": "My App",
"rootDir": "./src",
"tsConfig": "./tsconfig.json",
"entryPoint": "./src/index.ts",
"outputFile": "./circular-deps-report.json",
"ignorePatterns": [
"/src/libs/.*",
"/src/services/utils/.*",
]
}```