INNER CODE UNIT · TypeScript
onAddOrChange
hypermodeinc/modus · cli/src/commands/dev/index.ts:260
const onAddOrChange = async () => {
try {
runtimeOutput.pause();
this.log();
this.log(chalk.magentaBright("Detected manifest change. Applying..."));
await fs.copyFile(sourcePath, outputPath);
} catch (e) {
this.log(chalk.red(`Failed to copy ${MANIFEST_FILE} to build directory.`), e);
} finally {
this.log();
runtimeOutput.resume();
}
};
chokidar
.watch(sourcePath, {
ignoreInitial: true,
persistent: true,