fix: watch curriculum changes

This commit is contained in:
Oliver Eyton-Williams
2020-09-02 11:31:10 +02:00
parent df532099bc
commit 9718244431
2 changed files with 10 additions and 5 deletions

View File

@ -29,7 +29,8 @@ exports.sourceNodes = function sourceChallengesSourceNodes(
const watcher = chokidar.watch(curriculumPath, {
ignored: /(^|[\/\\])\../,
persistent: true,
usePolling: true
usePolling: true,
cwd: curriculumPath
});
watcher.on('change', filePath =>
@ -45,6 +46,7 @@ File changed at ${filePath}, replacing challengeNode id ${challenge.id}
})
.catch(e =>
reporter.error(`fcc-replace-challenge
attempting to replace ${filePath}
${e.message}