Skip to content

Commit

Permalink
[js] Set better execname in npm'able rakudo.js
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Nov 7, 2018
1 parent 0e4969f commit 9df074b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm/js/make-release.js
Expand Up @@ -30,6 +30,9 @@ function prepare(oldPath, newPath) {
contents = contents.replace('nqp.libpath(["' + path.join(rakudoPath, "node_modules/") + '","' + path.join(nqpInstallPath, "share/nqp/lib/nqp-js-on-js/") + '"]);', 'nqp.libpath([{module: module, prefix:\'.\/\'}, {module: module, prefix:\'nqp-js-on-js/\'}]);\n'); contents = contents.replace('nqp.libpath(["' + path.join(rakudoPath, "node_modules/") + '","' + path.join(nqpInstallPath, "share/nqp/lib/nqp-js-on-js/") + '"]);', 'nqp.libpath([{module: module, prefix:\'.\/\'}, {module: module, prefix:\'nqp-js-on-js/\'}]);\n');


contents = contents.replace('nqp.extraRuntime(\'perl6\', "' + path.join(rakudoPath, "src/vm/js/perl6-runtime") + '")', 'nqp.extraRuntime(\'perl6\', module);'); contents = contents.replace('nqp.extraRuntime(\'perl6\', "' + path.join(rakudoPath, "src/vm/js/perl6-runtime") + '")', 'nqp.extraRuntime(\'perl6\', module);');

contents = contents.replace('nqp.execname("' + path.join(rakudoPath, "perl6-js") + '")', 'nqp.execname(module.filename, true)');

fs.writeFileSync(newPath, contents); fs.writeFileSync(newPath, contents);
} }


Expand Down

0 comments on commit 9df074b

Please sign in to comment.