Skip to content

Commit e382cb3

Browse files
committed
fix: windows start error
1 parent c5eed6b commit e382cb3

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

mockServer/gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ gulp.task(
5353
return []
5454
},
5555
verbose: true,
56-
ignore: ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js'],
56+
ignore: ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js', 'data/*'],
5757
env: {
5858
NODE_ENV: 'development'
5959
},
@@ -77,7 +77,7 @@ gulp.task('nodemon', () => {
7777
js: jsScript
7878
},
7979
verbose: true,
80-
ignore: ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js'],
80+
ignore: ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js', 'data/*'],
8181
env: {
8282
NODE_ENV: 'development'
8383
},
@@ -92,7 +92,7 @@ gulp.task('default', () => {
9292
js: jsScript
9393
},
9494
verbose: true,
95-
ignore: ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js'],
95+
ignore: ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js', 'data/*'],
9696
env: {
9797
NODE_ENV: 'development'
9898
},

mockServer/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"scripts": {
2525
"start": "gulp nodemon",
2626
"dev": "gulp",
27-
"dev:file": "MOCK_DB_MODE=file gulp",
27+
"dev:file": "cross-env MOCK_DB_MODE=file gulp",
2828
"export-db-to-file": "node scripts/export-db-to-file.js",
2929
"build:js": "babel src --out-dir dist",
3030
"build:static": "ncp src/assets dist/assets && ncp src/mock dist/mock && ncp src/database dist/database",
@@ -35,6 +35,7 @@
3535
"dependencies": {
3636
"@babel/runtime": "^7.9.2",
3737
"@seald-io/nedb": "^4.0.2",
38+
"cross-env": "^7.0.3",
3839
"fs-extra": "^11.1.1",
3940
"glob": "^10.3.4",
4041
"koa": "^2.11.0",

0 commit comments

Comments
 (0)