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
|
||||
.version('0.6.0')
|
||||
|
||||
|
@ -39,13 +49,7 @@ program.command('deploy [env]').description('deploy contracts').action(function(
|
|||
run("grunt deploy_contracts:" + env);
|
||||
}
|
||||
else {
|
||||
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);
|
||||
deploy();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -59,7 +63,7 @@ program.command('build [env]').description('build dapp').action(function(env_) {
|
|||
run('grunt build:' + env);
|
||||
}
|
||||
else if (embarkConfig.type === "meteor") {
|
||||
//deploy
|
||||
deploy();
|
||||
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)
|
||||
}
|
||||
else if (embarkConfig.type === "meteor") {
|
||||
//deploy
|
||||
//build
|
||||
Embark = require('embark-framework')
|
||||
deploy();
|
||||
run("meteor-build-client ./build -p ''");
|
||||
Embark.release.ipfs("build/")
|
||||
}
|
||||
else {
|
||||
|
@ -106,6 +109,7 @@ program.command('spec').description('run specs').action(function() {
|
|||
}
|
||||
else {
|
||||
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