I work with two repo's; one with source code and one with E2E tests using CucumberJS:
- application-repo/
- application-e2e/
I would like to run npm run watch
in the second repo and wait for changes to files in the first repo; because I want to have my CucumberJS tests run on changes to the source-code. The place I work dictate me not to have the e2e-tests in the same repo, as the source code.
Similar question, but with pm2
instead of npm-watch
/ watch
:
Watch files outside the current directory using pm2
It was a lot easier than I thought, at least when using
watch
and notnpm-watch
, but probably both can be used the same way.Here's my
package.json
of the second repo:When running
npm run watch
in the second repo, changes made in the first repo will make it writehello
in the terminal of the second repo.