mirror of https://github.com/embarklabs/embark.git
update meteor commands
This commit is contained in:
parent
92d37fd60a
commit
9a5c3906cd
26
bin/embark
26
bin/embark
|
@ -14,6 +14,16 @@ var run = function(cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var deploy = fnction(embarkConfig) {
|
||||||
|
contractFiles = grunt.file.expand(embarkConfig.contracts);
|
||||||
|
destFile = embarkConfig.output
|
||||||
|
Embark.init()
|
||||||
|
Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig)
|
||||||
|
Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig)
|
||||||
|
abi = Embark.deployContracts(env, contractFiles, destFile)
|
||||||
|
grunt.file.write(destFile, abi);
|
||||||
|
}
|
||||||
|
|
||||||
program
|
program
|
||||||
.version('0.6.0')
|
.version('0.6.0')
|
||||||
|
|
||||||
|
@ -39,13 +49,7 @@ program.command('deploy [env]').description('deploy contracts').action(function(
|
||||||
run("grunt deploy_contracts:" + env);
|
run("grunt deploy_contracts:" + env);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
contractFiles = grunt.file.expand(embarkConfig.contracts);
|
deploy();
|
||||||
destFile = embarkConfig.output
|
|
||||||
Embark.init()
|
|
||||||
Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig)
|
|
||||||
Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig)
|
|
||||||
abi = Embark.deployContracts(env, contractFiles, destFile)
|
|
||||||
grunt.file.write(destFile, abi);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -59,7 +63,7 @@ program.command('build [env]').description('build dapp').action(function(env_) {
|
||||||
run('grunt build:' + env);
|
run('grunt build:' + env);
|
||||||
}
|
}
|
||||||
else if (embarkConfig.type === "meteor") {
|
else if (embarkConfig.type === "meteor") {
|
||||||
//deploy
|
deploy();
|
||||||
run("meteor-build-client ./build -p ''");
|
run("meteor-build-client ./build -p ''");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -75,9 +79,8 @@ program.command('ipfs [env]').description('build dapp and make it available in i
|
||||||
run('grunt ipfs:' + env)
|
run('grunt ipfs:' + env)
|
||||||
}
|
}
|
||||||
else if (embarkConfig.type === "meteor") {
|
else if (embarkConfig.type === "meteor") {
|
||||||
//deploy
|
deploy();
|
||||||
//build
|
run("meteor-build-client ./build -p ''");
|
||||||
Embark = require('embark-framework')
|
|
||||||
Embark.release.ipfs("build/")
|
Embark.release.ipfs("build/")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -106,6 +109,7 @@ program.command('spec').description('run specs').action(function() {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("command not available in meteor or manual mode yet");
|
console.log("command not available in meteor or manual mode yet");
|
||||||
|
console.log("note: you can use embark tests with any framework");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue