MCPcopy Create free account
hub / github.com/neplextech/vectorizer / buildIndexJs

Function buildIndexJs

scripts/postbuild.js:21–29  ·  view source on GitHub ↗
(nativeExportNames)

Source from the content-addressed store, hash-verified

19}
20
21function buildIndexJs(nativeExportNames) {
22 const originalSource = readFileSync('./index.js', 'utf-8');
23 const exportStatements = nativeExportNames.map((name) => `module.exports.${name} = nativeBinding.${name}`).join('\n');
24
25 return `${originalSource.split(EXPORT_MARKER)[0].trimEnd()}\n
26${EXPORT_MARKER}
27${exportStatements}
28`;
29}
30
31function postbuild() {
32 const jsBindings = readFileSync('./js-bindings.js', 'utf-8');

Callers 1

postbuildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…