mirror of
https://github.com/chatmail/core.git
synced 2026-05-14 04:16:30 +03:00
fix: rpc npm: fix local desktop development (#5583)
typescript was complaining about missing `@deltachat/jsonrpc-client` when it wasn't installed locally
This commit is contained in:
3
deltachat-rpc-server/npm-package/.gitignore
vendored
3
deltachat-rpc-server/npm-package/.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
platform_package
|
platform_package
|
||||||
*.tgz
|
*.tgz
|
||||||
|
package-lock.json
|
||||||
@@ -29,3 +29,6 @@ subprocess.run(["python", "scripts/build_platform_package.py", host_target], cap
|
|||||||
|
|
||||||
# run update_optional_dependencies_and_version.js to adjust the package / make it installable locally
|
# run update_optional_dependencies_and_version.js to adjust the package / make it installable locally
|
||||||
subprocess.run(["node", "scripts/update_optional_dependencies_and_version.js", "--local"], capture_output=False, check=True)
|
subprocess.run(["node", "scripts/update_optional_dependencies_and_version.js", "--local"], capture_output=False, check=True)
|
||||||
|
|
||||||
|
# typescript / npm local package installing/linking needs that this package has it's own node_modules folder
|
||||||
|
subprocess.run(["npm", "i"], capture_output=False, check=True)
|
||||||
|
|||||||
@@ -54,4 +54,10 @@ for (const { folder_name, package_name } of platform_package_names) {
|
|||||||
: version;
|
: version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_local) {
|
||||||
|
package_json.peerDependencies["@deltachat/jsonrpc-client"] = 'file:../../deltachat-jsonrpc/typescript'
|
||||||
|
} else {
|
||||||
|
package_json.peerDependencies["@deltachat/jsonrpc-client"] = "*"
|
||||||
|
}
|
||||||
|
|
||||||
await fs.writeFile("./package.json", JSON.stringify(package_json, null, 4));
|
await fs.writeFile("./package.json", JSON.stringify(package_json, null, 4));
|
||||||
|
|||||||
Reference in New Issue
Block a user