Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare could take a json file as argument #40

Open
hswick opened this issue Nov 9, 2018 · 0 comments
Open

prepare could take a json file as argument #40

hswick opened this issue Nov 9, 2018 · 0 comments

Comments

@hswick
Copy link
Contributor

hswick commented Nov 9, 2018

Right now use of prepare.js can involve a lengthy amount of arguments since we use absolute paths and there are usually around 5 arguments to give.

Thoughts are we could add a --json flag that accepts a path to a json file serving as a configuration for the task.

We could replace:

node /truebit-toolchain/modules/emscripten-module-wrapper/prepare.js \
/workspace/reverse_alphabet/reverse_alphabet.js \
--file /workspace/reverse_alphabet/alphabet.txt \
--file /workspace/reverse_alphabet/reverse_alphabet.txt \
--asmjs \
--out /workspace/dist

With:

node /truebit-toolchain/modules/emscripten-module-wrapper/prepare.js --json /workspace/reverse_alphabet/task_config.json

task_config.json looks like:

{
     source: "/workspace/reverse_alphabet/reverse_alphabet.js",
     files: [
         "/workspace/reverse_alphabet/alphabet.txt",
         "/workspace/reverse_alphabet/reverse_alphabet.txt"
     ],
     asmjs: true,
     out: "/workspace/dist"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant