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