File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const fs = require ( "fs" ) ;
2+
3+ const a = process . argv [ 2 ] ;
4+ const b = process . argv [ 3 ] ;
5+ const out = process . argv [ 4 ] ;
6+
7+ const aJson = JSON . parse ( fs . readFileSync ( a ) ) ;
8+ const bJson = JSON . parse ( fs . readFileSync ( b ) ) ;
9+
10+ delete aJson . scripts ;
11+ delete aJson . dependencies ;
12+ delete aJson . devDependencies ;
13+ delete aJson . optionalDependencies ;
14+
15+ fs . writeFileSync ( out , JSON . stringify ( {
16+ ...aJson ,
17+ ...bJson ,
18+ } , null , 2 ) ) ;
Original file line number Diff line number Diff line change 11{
2- "name" : " code-server"
2+ "name" : " code-server" ,
3+ "main" : " out/vs/server/main" ,
4+ "desktopName" : " code-server-url-handler.desktop"
35}
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ function build-code-server() {
6868 mkdir -p " ${codeServerBuildPath} "
6969
7070 cp -r " ${vscodeBuildPath} /resources/app/extensions" " ${codeServerBuildPath} "
71- jq -s ' .[0] * .[1] ' " ${vscodeBuildPath} /resources/app/package.json" " ${rootPath} /scripts/package.json" > " ${codeServerBuildPath} /package.json"
72- jq -s ' .[0] * .[1] ' " ${vscodeBuildPath} /resources/app/product.json" " ${rootPath} /scripts/product.json" > " ${codeServerBuildPath} /product.json"
71+ node " ${rootPath} /scripts/merge.js " " ${vscodeBuildPath} /resources/app/package.json" " ${rootPath} /scripts/package.json" " ${codeServerBuildPath} /package.json"
72+ node " ${rootPath} /scripts/merge.js " " ${vscodeBuildPath} /resources/app/product.json" " ${rootPath} /scripts/product.json" " ${codeServerBuildPath} /product.json"
7373 cp -r " ${vscodeSourcePath} /out" " ${codeServerBuildPath} "
7474 rm -rf " ${codeServerBuildPath} /out/vs/server/node_modules"
7575 cp -r " ${vscodeSourcePath} /remote/node_modules" " ${codeServerBuildPath} "
You can’t perform that action at this time.
0 commit comments