[dev] Add unified {build,test} watch mode, using "concurrently" (#1011)
I noticed that the development README suggested using multiple console windows/tabs for a good development experience. Using the package `concurrently`, we can streamline that and require only one window with output for both watch processes: ![image](https://user-images.githubusercontent.com/12286274/88694827-477d9e80-d0be-11ea-898c-ee9a509db4bb.png) Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
This commit is contained in:
parent
8e8cd24e0d
commit
3e5f1fabad
|
@ -40,7 +40,8 @@ After doing so, you can run Nativefier with your test parameters:
|
|||
nativefier --your-awesome-new-flag 'https://your-test-site.com'
|
||||
```
|
||||
|
||||
Then run your nativefier app *through the command line too* (to see logs & errors):
|
||||
Then run your nativefier app _through the command line too_ (to see logs & errors):
|
||||
|
||||
```bash
|
||||
# Under Linux
|
||||
./your-test-site-linux-x64/your-test-site
|
||||
|
@ -67,5 +68,6 @@ but is painful to do manually. Do yourself a favor and install a
|
|||
- Logging is suppressed by default in tests, to avoid polluting Jest output.
|
||||
To get debug logs, `npm run test:withlog` or set the `LOGLEVEL` env. var.
|
||||
- For a good live experience, open two terminal panes/tabs running code/tests watchers:
|
||||
1. Run a TSC watcher: `npm run build:watch`
|
||||
2. Run a Jest unit tests watcher: `npm run test:watch`
|
||||
1. Run a TSC watcher: `npm run build:watch`
|
||||
2. Run a Jest unit tests watcher: `npm run test:watch`
|
||||
- Alternatively, you can run both test processes in the same terminal by running: `npm run watch`
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
"test:unit": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:withlog": "LOGLEVEL=trace npm run test",
|
||||
"test": "jest --testRegex '[-.]test\\.js$'"
|
||||
"test": "jest --testRegex '[-.]test\\.js$'",
|
||||
"watch": "npx concurrently \"npm:*:watch\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/cheerio": "0.x",
|
||||
|
|
Loading…
Reference in New Issue