Skip to content

prepare could take a json file as argument #40

Description

@hswick

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions