Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/segmentio/dependency-report
Generate usage reports of your JS dependencies
https://github.com/segmentio/dependency-report
Last synced: 3 months ago
JSON representation
Generate usage reports of your JS dependencies
- Host: GitHub
- URL: https://github.com/segmentio/dependency-report
- Owner: segmentio
- Archived: true
- Created: 2018-02-28T19:54:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T13:19:15.000Z (over 1 year ago)
- Last Synced: 2024-05-21T12:00:15.984Z (8 months ago)
- Language: JavaScript
- Size: 719 KB
- Stars: 130
- Watchers: 3
- Forks: 20
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - dependency-report - Generate usage reports of your JS dependencies (JavaScript)
README
# dependency-report
> Generate usage reports for JavaScript dependencies through an AST.
_Note: only supports ES2015 `import` statements (not CommonJS `require` calls)._
## Install
```
yarn add @segment/dependency-report
# or
npm install @segment/dependency-report
```## CLI Usage
### Input
```
$ dependency-report './client/**/*.js' --packages=evergreen-ui --exports=SideSheet
```### Results
```
[
[
{
"name": "SideSheet",
"files": 6,
"filepaths": [
"./client/components/Customers/Audiences/Audience/Overview/RunOverview/index.js",
"./client/components/Customers/Destinations/View.js",
"./client/components/Customers/DestinationSettings.js",
"./client/components/Destinations/DestinationErrors/ErrorSheet.js",
"./client/components/WorkspaceSettingsV2/DeletionRequests/RegulationSheet.js",
"./client/containers/Navigation/UserDropdownApp.js"
]
}
]
]
```### input
```
$ dependency-report './client/**/*.js' --packages=evergreen-ui --exports=SideSheet,Popover,CornerDialog,RadioGroup
```### Results
```
[
[
{
"name": "SideSheet",
"files": 6,
"filepaths": [
"./client/components/Customers/Audiences/Audience/Overview/RunOverview/index.js",
"./client/components/Customers/Destinations/View.js",
"./client/components/Customers/DestinationSettings.js",
"./client/components/Destinations/DestinationErrors/ErrorSheet.js",
"./client/components/WorkspaceSettingsV2/DeletionRequests/RegulationSheet.js",
"./client/containers/Navigation/UserDropdownApp.js"
]
},
{
"name": "Popover",
"files": 2,
"filepaths": [
"./client/components/WorkspaceSettingsV2/SuppressedUsers/RemoveButton.js",
"./client/containers/Navigation/UserDropdownApp.js"
]
},
{
"name": "CornerDialog",
"files": 4,
"filepaths": [
"./client/components/GDPRNotification.js",
"./client/components/NewAgreementNotification.js",
"./client/components/Sources/SourceDebugger/TestConnectionNotice.js",
"./client/containers/Sources/SourceSchema/DataGovernanceFeedbackApp.js"
]
},
{
"name": "RadioGroup",
"files": 0,
"filepaths": []
}
]
]
```## Usage
```javascript
const DependencyReport = require('@segment/dependency-report')const report = new DependencyReport({
files: '**/*.js'
})
```