Skip to content

Commit 5924b3e

Browse files
committed
build: install mock-server when in dev environment
1 parent 7df025f commit 5924b3e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package-lock.json

Lines changed: 5 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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
"test:docker": "bash ./test/docker/run-docker-test.bash",
3939
"test:deps": "npx depcheck --ignores=\"@types/*\"",
4040
"posttest": "npm run check",
41-
"package": "npx yarn pack --filename openapi-cop.tgz"
41+
"package": "npx yarn pack --filename openapi-cop.tgz",
42+
"preinstall": "per-env",
43+
"preinstall:development": "cd mock-server && npm install"
4244
},
4345
"dependencies": {
4446
"@types/express": "4.17.4",
@@ -56,6 +58,7 @@
5658
"lodash": "4.17.21",
5759
"openapi-backend": "3.9.2",
5860
"openapi-types": "10.0.0",
61+
"per-env": "^1.0.2",
5962
"qs": "6.10.3",
6063
"request-promise-native": "1.0.9",
6164
"swagger-client": "3.18.4",

0 commit comments

Comments
 (0)