Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run with nodemon or chokidar? #256

Open
bburns opened this issue Jun 8, 2020 · 0 comments
Open

How to run with nodemon or chokidar? #256

bburns opened this issue Jun 8, 2020 · 0 comments

Comments

@bburns
Copy link

bburns commented Jun 8, 2020

Just in case someone needs this - this will keep running riteway as changes are made to the source or test files. Couldn't get it to work with nodemon but chokidar-cli works - it uses chokidar to monitor files and run a command after any changes.

Install chokidar-cli - https://github.com/kimmobrunfeldt/chokidar-cli

npm install --save-dev chokidar-cli

Update the test script in package.json - the --command option specifies the command to run after any of the specified files change, and --initial tells chokidar to run the command once on start -

{
  "name": "ta",
  "version": "0.1.0",
  "scripts": {
    "test": "chokidar \"src/**/*.js\" --initial --command \"riteway -r esm src/**/*.test.js | tap-nirvana\""
  },
  "license": "ISC",
  "devDependencies": {
    "chokidar-cli": "^2.1.0",
    "esm": "^3.2.25",
    "riteway": "^6.1.2",
    "tap-nirvana": "^1.1.0"
  }
}

Then just

npm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant