diff --git a/src/watch/index.ts b/src/watch/index.ts index 33e101d1..7246838d 100644 --- a/src/watch/index.ts +++ b/src/watch/index.ts @@ -27,7 +27,7 @@ const flags = { description: 'Clearing the screen on rerun', default: true, }, - ignored: { + ignore: { type: [String], description: 'Paths & globs to exclude from being watched', default: [], @@ -52,7 +52,7 @@ export const watchCommand = command({ noCache: argv.flags.noCache, tsconfigPath: argv.flags.tsconfig, clearScreen: argv.flags.clearScreen, - ignored: argv.flags.ignored, + ignore: argv.flags.ignore, ipc: true, }; @@ -130,7 +130,7 @@ export const watchCommand = command({ // Distribution files '**/dist/**', - ...options.ignored, + ...options.ignore, ], ignorePermissionErrors: true, }, diff --git a/tests/foo.test.ts b/tests/foo.test.ts new file mode 100644 index 00000000..6eb8f255 --- /dev/null +++ b/tests/foo.test.ts @@ -0,0 +1,3 @@ +import { test } from 'node:test'; + +test('YEAH BABY', () => {}); diff --git a/tests/specs/watch.ts b/tests/specs/watch.ts index 353832dc..9a56d872 100644 --- a/tests/specs/watch.ts +++ b/tests/specs/watch.ts @@ -164,8 +164,8 @@ export default testSuite(async ({ describe }, fixturePath: string) => { args: [ 'watch', '--clear-screen=false', - `--ignored=${path.join(fixtures.path, ignoredFilenames[0])}`, - `--ignored=${path.join(fixtures.path, ignoredFilenames[1])}`, + `--ignore=${path.join(fixtures.path, ignoredFilenames[0])}`, + `--ignore=${path.join(fixtures.path, ignoredFilenames[1])}`, path.join(fixtures.path, includedFilename), ], });