Skip to content

Commit

Permalink
refactor: use watchInputDir instead of chokidar
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Aug 17, 2024
1 parent 6103c6a commit 35e0531
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
],
"dependencies": {
"aspida": "^1.14.0",
"chokidar": "^3.6.0",
"openapi-types": "^12.1.3",
"typescript-json-schema": "^0.64.0"
},
Expand Down
6 changes: 3 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getConfigs } from 'aspida/dist/cjs/getConfigs';
import watchInputDir from 'aspida/dist/cjs/watchInputDir';
import minimist from 'minimist';
import build from '.';
import type { ConfigFile, PartialConfig } from './getConfig';
import { watchIndexFiles } from './watchIndexFiles';

export const run = (args: string[]) => {
const argv: Record<string, string | undefined> = minimist(args, {
Expand All @@ -21,7 +21,7 @@ export const run = (args: string[]) => {
build(configs);

if (argv.watch !== undefined) {
configs.forEach((config) => watchIndexFiles(config.input, () => build(config)));
configs.forEach((config) => watchInputDir(config.input, () => build(config)));
}

return;
Expand All @@ -38,5 +38,5 @@ export const run = (args: string[]) => {

build(option);

if (argv.watch !== undefined) watchIndexFiles(config.input, () => build(option));
if (argv.watch !== undefined) watchInputDir(config.input, () => build(option));
};
7 changes: 0 additions & 7 deletions src/watchIndexFiles.ts

This file was deleted.

0 comments on commit 35e0531

Please sign in to comment.