mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-08 13:25:17 +00:00
Merge pull request #620 from embark-framework/features/bin-entry-ganache-cli
Features/bin entry ganache cli
This commit is contained in:
commit
ff7a4bd1dd
@ -12,13 +12,14 @@ class Simulator {
|
||||
run(options) {
|
||||
let cmds = [];
|
||||
|
||||
const testrpc = shelljs.which('testrpc');
|
||||
const ganache = shelljs.which('ganache-cli');
|
||||
if (!testrpc && !ganache) {
|
||||
this.logger.warn(__('%s is not installed on your machine', 'Ganache CLI (TestRPC)'));
|
||||
this.logger.info(__('You can install it by running: %s', 'npm -g install ganache-cli'));
|
||||
process.exit();
|
||||
}
|
||||
const ganache = shelljs.which('ganache-cli-embark');
|
||||
// const testrpc = shelljs.which('testrpc');
|
||||
// const ganache = shelljs.which('ganache-cli');
|
||||
// if (!testrpc && !ganache) {
|
||||
// this.logger.warn(__('%s is not installed on your machine', 'Ganache CLI (TestRPC)'));
|
||||
// this.logger.info(__('You can install it by running: %s', 'npm -g install ganache-cli'));
|
||||
// process.exit();
|
||||
// }
|
||||
|
||||
let useProxy = this.blockchainConfig.proxy || false;
|
||||
let host = (options.host || this.blockchainConfig.rpcHost || 'localhost');
|
||||
@ -44,8 +45,11 @@ class Simulator {
|
||||
cmds.push("-b \"" + (simulatorBlocktime) +"\"");
|
||||
}
|
||||
|
||||
const program = ganache ? 'ganache-cli' : 'testrpc';
|
||||
console.log(`running: ${program} ${cmds.join(' ')}`);
|
||||
// const programName = ganache ? 'ganache-cli' : 'testrpc';
|
||||
// const program = ganache ? ganache : testrpc;
|
||||
const programName = 'ganache-cli';
|
||||
const program = ganache;
|
||||
console.log(`running: ${programName} ${cmds.join(' ')}`);
|
||||
shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true});
|
||||
|
||||
if(useProxy){
|
||||
|
@ -10,7 +10,8 @@
|
||||
"fulltest": "npm run lint && npm run test && npm run testdapp_1 && npm run testdapp_2"
|
||||
},
|
||||
"bin": {
|
||||
"embark": "./bin/embark"
|
||||
"embark": "./bin/embark",
|
||||
"ganache-cli-embark": "./node_modules/.bin/ganache-cli"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"directories": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user