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 24, 2019
1 parent bb93132 commit 13e15a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/patch-package.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 13e15a4

Please sign in to comment.