mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-19 17:14:40 +00:00
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_) {
|
program.command('build [env]').description('build dapp').action(function(env_) {
|
||||||
var env = env_ || 'development';
|
var env = env_ || 'development';
|
||||||
run("grunt clean");
|
var embarkConfig = readYaml.sync("./embark.yml");
|
||||||
run("grunt deploy_contracts:" + env);
|
|
||||||
run('grunt build:' + env);
|
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_) {
|
program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) {
|
||||||
var env = env_ || 'development';
|
var env = env_ || 'development';
|
||||||
run("grunt clean")
|
var embarkConfig = readYaml.sync("./embark.yml");
|
||||||
run("grunt deploy_contracts:" + env)
|
|
||||||
run('grunt build:' + env)
|
if (embarkConfig.type === "grunt") {
|
||||||
run('grunt ipfs:' + env)
|
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_) {
|
program.command('run [env]').description('run dapp').action(function(env_) {
|
||||||
var env = env_ || 'development';
|
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() {
|
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_) {
|
program.command('blockchain [env]').description('run blockchain').action(function(env_) {
|
||||||
var env = env_ || 'development';
|
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() {
|
program.command('demo').description('create a working dapp with a SimpleStorage contract').action(function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user