Watches more files that are relevent to the keycloak theme

This commit is contained in:
Joseph Garrone
2024-05-28 00:55:46 +02:00
parent 56d6d8001a
commit fdfcd78f02

View File

@ -417,7 +417,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
`- password: ${chalk.cyan.bold("password123")}`, `- password: ${chalk.cyan.bold("password123")}`,
"", "",
`Watching for changes in ${chalk.bold( `Watching for changes in ${chalk.bold(
`.${pathSep}${pathRelative(process.cwd(), srcDirPath)}` `.${pathSep}${pathRelative(process.cwd(), buildOptions.reactAppRootDirPath)}`
)}` )}`
].join("\n") ].join("\n")
); );
@ -455,10 +455,23 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
const { waitForDebounce } = waitForDebounceFactory({ delay: 400 }); const { waitForDebounce } = waitForDebounceFactory({ delay: 400 });
chokidar chokidar
.watch([srcDirPath, pathJoin(getThisCodebaseRootDirPath(), "src")], { .watch(
[
srcDirPath,
buildOptions.publicDirPath,
pathJoin(buildOptions.reactAppRootDirPath, "package.json"),
pathJoin(buildOptions.reactAppRootDirPath, "vite.config.ts"),
pathJoin(buildOptions.reactAppRootDirPath, "vite.config.js"),
pathJoin(buildOptions.reactAppRootDirPath, "index.html"),
pathJoin(getThisCodebaseRootDirPath(), "src")
],
{
ignoreInitial: true ignoreInitial: true
}) }
.on("all", async () => { )
.on("all", async (...[, filePath]) => {
console.log(`Detected changes in ${filePath}`);
await waitForDebounce(); await waitForDebounce();
runFullBuild(); runFullBuild();