Skip to content

Commit cd1b025

Browse files
committed
chore: add watch script for tests
1 parent 4054597 commit cd1b025

File tree

2 files changed

+169
-1
lines changed

2 files changed

+169
-1
lines changed

package-lock.json

Lines changed: 162 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@
1313
"./package.json": "./package.json",
1414
"./server-variables.bnf": "./src/server-url-templating.bnf"
1515
},
16+
"watch": {
17+
"test": "{src,test}/*.js"
18+
},
1619
"scripts": {
1720
"prepublishOnly": "npm run build",
1821
"grammar:compile": "node ./scripts/apg-js.js --lite --in=./src/server-url-templating.bnf --out=./src/server-url-templating.js && cd ./src",
1922
"build": "npm run grammar:compile && npm run build:es && npm run build:cjs && npm run build:cjs:apg-lite",
2023
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es --extensions '.js' --out-file-extension '.mjs'",
2124
"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir cjs --extensions '.js' --out-file-extension '.cjs'",
2225
"build:cjs:apg-lite": "cross-env BABEL_ENV=cjs babel node_modules/apg-lite/lib/parser.js --out-file ./cjs/apg-lite.cjs",
23-
"test": "mocha"
26+
"test": "mocha",
27+
"test:watch": "npm-watch test",
28+
"watch": "npm-watch"
2429
},
2530
"engines": {
2631
"node": ">=12.20.0"
@@ -70,6 +75,7 @@
7075
"cross-env": "^7.0.3",
7176
"husky": "=9.1.7",
7277
"mocha": "=10.8.2",
78+
"npm-watch": "^0.13.0",
7379
"prettier": "^3.3.1"
7480
}
7581
}

0 commit comments

Comments
 (0)