Skip to content

Commit

Permalink
plugin: patch node-pre-gyp libc replacement
Browse files Browse the repository at this point in the history
Adds an instruction to patch the libc name in the binary path
configuration for native modules using node-pre-gyp.
  • Loading branch information
jaimecbernardo committed Apr 23, 2019
1 parent 9bbb23c commit 5cffbe6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions install/hooks/both/after-prepare-patch-npm-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function patchPackageJSON_preNodeGyp_modulePath(filePath)
binaryPathConfiguration = binaryPathConfiguration.replace(/\{platform\}/g, "platform");
binaryPathConfiguration = binaryPathConfiguration.replace(/\{arch\}/g, "arch");
binaryPathConfiguration = binaryPathConfiguration.replace(/\{target_arch\}/g, "target_arch");
binaryPathConfiguration = binaryPathConfiguration.replace(/\{libc\}/g, "libc");
packageJSON.binary.module_path = binaryPathConfiguration;
let packageWriteData = JSON.stringify(packageJSON, null, 2);
fs.writeFileSync(filePath, packageWriteData);
Expand Down

0 comments on commit 5cffbe6

Please sign in to comment.