@kubiklabs/wasmkit
Version:
Wasmkit is a development environment to compile, deploy, test, run cosmwasm contracts on different networks.
26 lines (25 loc) • 1.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const config_env_1 = require("../internal/core/config/config-env");
const argument_types_1 = require("../internal/core/params/argument-types");
const checkEnv_1 = require("../lib/compile/checkEnv");
const compile_1 = require("../lib/compile/compile");
const task_names_1 = require("./task-names");
function default_1() {
(0, config_env_1.task)(task_names_1.TASK_COMPILE, "Compile all secret contracts")
.addOptionalParam("docker", "Compiling with docker", false, argument_types_1.boolean)
.addOptionalVariadicPositionalParam("sourceDir", "Path for a specific contract to compile", [])
.addFlag("force", "recompile even if the source file didn't change")
.addFlag("skipSchema", "do not generate schema at compile")
.addFlag("skipSchemaErrors", "skip methods in TS schema having issues converting")
.setAction(compileTask);
}
exports.default = default_1;
async function compileTask({ docker, sourceDir, force, skipSchema, skipSchemaErrors }, env) {
// check if proper version of rust wasm compiler is installed
// If not, install it
if (!(await (0, checkEnv_1.canCompile)(env))) {
process.exit(1);
}
return await (0, compile_1.compile)(docker, sourceDir, force, skipSchema, skipSchemaErrors, env);
}