Skip to content

Commit 6103c6a

Browse files
committed
fix: use glob pattern in chokidar path
1 parent e6be867 commit 6103c6a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,5 @@ export default (configs?: PartialConfig) =>
153153
};
154154

155155
writeFileSync(config.output, toOpenAPI({ input: config.input, template }), 'utf8');
156+
console.log(`${config.output} was built successfully.`);
156157
});

src/watchIndexFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import chokidar from 'chokidar';
22

33
export const watchIndexFiles = (dir: string, callback: () => void) => {
44
chokidar
5-
.watch(dir, { ignoreInitial: true, ignored: /^(?!.*\/index\.ts$).*$/ })
5+
.watch(`${dir.replace(/\/$/, '')}/**/index.ts`, { ignoreInitial: true })
66
.on('all', callback);
77
};

0 commit comments

Comments
 (0)