-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* modularized binary * modularized binary
- Loading branch information
1 parent
5a7b67f
commit e8b4804
Showing
5 changed files
with
67 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
mkdir -p $PREFIX/bin | ||
cp $RECIPE_DIR/run_modularized.js $PREFIX/bin/run_modularized | ||
chmod +x $PREFIX/bin/run_modularized | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
context: | ||
name: run_modularized | ||
version: "0.1.0" | ||
|
||
package: | ||
name: ${{ name|lower }} | ||
version: ${{ version }} | ||
|
||
build: | ||
number: 0 | ||
|
||
requirements: | ||
run: | ||
- nodejs | ||
|
||
about: | ||
license: BSD-3-Clause | ||
summary: run_modularized | ||
description: run_modularized | ||
extra: | ||
recipe-maintainers: | ||
- DerThorsten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
const binary_js_runner = process.argv[2]; | ||
process.argv = process.argv.slice(3); | ||
async function my_main(){ | ||
const ModuleF = require(binary_js_runner); | ||
const Module = await ModuleF({ | ||
noInitialRun: true, | ||
// arguments: args_without_js_path | ||
}); | ||
const ret = Module.callMain(process.argv); | ||
return ret; | ||
} | ||
(async function() { | ||
const exitCode = await my_main(); | ||
// exit the process | ||
process.exit(exitCode); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters