mirror of https://github.com/embarklabs/embark.git
take into account other type of cmds
This commit is contained in:
parent
d55f31f64b
commit
1fef23a14c
55
bin/embark
55
bin/embark
|
@ -51,31 +51,66 @@ program.command('deploy [env]').description('deploy contracts').action(function(
|
|||
|
||||
program.command('build [env]').description('build dapp').action(function(env_) {
|
||||
var env = env_ || 'development';
|
||||
run("grunt clean");
|
||||
run("grunt deploy_contracts:" + env);
|
||||
run('grunt build:' + env);
|
||||
var embarkConfig = readYaml.sync("./embark.yml");
|
||||
|
||||
if (embarkConfig.type === "grunt") {
|
||||
run("grunt clean");
|
||||
run("grunt deploy_contracts:" + env);
|
||||
run('grunt build:' + env);
|
||||
}
|
||||
});
|
||||
|
||||
program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) {
|
||||
var env = env_ || 'development';
|
||||
run("grunt clean")
|
||||
run("grunt deploy_contracts:" + env)
|
||||
run('grunt build:' + env)
|
||||
run('grunt ipfs:' + env)
|
||||
var embarkConfig = readYaml.sync("./embark.yml");
|
||||
|
||||
if (embarkConfig.type === "grunt") {
|
||||
run("grunt clean")
|
||||
run("grunt deploy_contracts:" + env)
|
||||
run('grunt build:' + env)
|
||||
run('grunt ipfs:' + env)
|
||||
}
|
||||
else {
|
||||
console.log("command not available in meteor or manual mode yet");
|
||||
}
|
||||
});
|
||||
|
||||
program.command('run [env]').description('run dapp').action(function(env_) {
|
||||
var env = env_ || 'development';
|
||||
run('grunt deploy:' + env);
|
||||
var embarkConfig = readYaml.sync("./embark.yml");
|
||||
|
||||
if (embarkConfig.type === "grunt") {
|
||||
run('grunt deploy:' + env);
|
||||
}
|
||||
else {
|
||||
console.log("command not available in meteor or manual mode yet");
|
||||
}
|
||||
});
|
||||
|
||||
program.command('spec').description('run specs').action(function() {
|
||||
run('jasmine');
|
||||
var embarkConfig = readYaml.sync("./embark.yml");
|
||||
|
||||
if (embarkConfig.type === "grunt") {
|
||||
run('jasmine');
|
||||
}
|
||||
else {
|
||||
console.log("command not available in meteor or manual mode yet");
|
||||
}
|
||||
});
|
||||
|
||||
program.command('blockchain [env]').description('run blockchain').action(function(env_) {
|
||||
var env = env_ || 'development';
|
||||
run('grunt blockchain:' + env);
|
||||
var embarkConfig = readYaml.sync("./embark.yml");
|
||||
|
||||
if (embarkConfig.type === "grunt") {
|
||||
run('grunt blockchain:' + env);
|
||||
}
|
||||
else {
|
||||
Embark.init()
|
||||
Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig)
|
||||
Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig)
|
||||
Embark.startBlockchain(env);
|
||||
}
|
||||
});
|
||||
|
||||
program.command('demo').description('create a working dapp with a SimpleStorage contract').action(function() {
|
||||
|
|
Loading…
Reference in New Issue