Skip to content

Commit 0c38447

Browse files
committed
fix(sdk build, package.json): added a copy-files script which is OS independent
Previously we were using cp command to copy services.proto file from proto folder to dist folder but cp command doesnt work for windows and hence the build fails in windows. I added "copy-files" script which uses copyfiles npm module to copy proto file and is OS independent. fix #51 Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>
1 parent 88691f5 commit 0c38447

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"dist"
77
],
88
"scripts": {
9-
"build": "tsc && cp ./proto/services.proto ./dist/proto/",
9+
"build": "tsc && yarn copy-files",
1010
"prepare": "npm run build",
11-
"commit": "cz"
11+
"commit": "cz",
12+
"copy-files":"copyfiles -u 1 ./proto/services.proto ./dist/proto/"
1213
},
1314
"repository": "git@github.com:keploy/typescript-sdk.git",
1415
"author": "Rajat Sharma <lunasunkaiser@gmail.com>",
@@ -49,6 +50,7 @@
4950
"import-in-the-middle": "^1.3.4",
5051
"merge-descriptors": "^1.0.1",
5152
"node-fetch": "^2.6.7",
52-
"require-in-the-middle": "^5.1.0"
53+
"require-in-the-middle": "^5.1.0",
54+
"copyfiles": "^2.4.1"
5355
}
5456
}

0 commit comments

Comments
 (0)