Skip to content

Commit 529502e

Browse files
committed
fix(analyze): respect directory option in analyze command
1 parent f2582ba commit 529502e

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.changeset/slow-spies-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'clean-modules': patch
3+
---
4+
5+
Respect `directory` option in `analyze` command.

src/cli/commands/analyze.command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class AnalyzeCommand extends BaseCommand {
1010

1111
async execute(): Promise<void> {
1212
const analyzeResults = await analyze({
13+
directory: this.directory,
1314
globs: this.globs,
1415
noDefaults: this.noDefaults,
1516
globFile: this.globFile,

src/shared.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export const DEFAULT_GLOBS_FILE_PATH = path.resolve(
88
);
99

1010
export interface SharedOptions {
11-
// The directory to clean, usually node_modules.
11+
/** The directory to clean, usually node_modules. */
1212
directory?: string;
13-
// Path to a custom glob file. Uses `.cleanmodules` by default.
13+
/** Path to a custom glob file. Uses `.cleanmodules` by default. */
1414
globFile?: string;
15-
// Whether or not to include clean-modules' default globs.
15+
/** Whether or not to include clean-modules' default globs. */
1616
noDefaults?: boolean;
17-
// List of custom globs to include or exclude.
17+
/** List of custom globs to include or exclude. */
1818
globs?: string[] | undefined;
1919
}
2020

0 commit comments

Comments
 (0)