diff --git a/lib/index.js b/lib/index.js index e321a4be2..f1a2454fa 100644 --- a/lib/index.js +++ b/lib/index.js @@ -312,7 +312,9 @@ class Embark { if (cmdPlugins.length > 0) { cmdPlugin = cmdPlugins.find((pluginCmd) => { - return pluginCmd.name == platform; + return pluginCmd.uploadCmds.some(uploadCmd => { + return uploadCmd.cmd === platform; + }); }); } if (!cmdPlugin) { diff --git a/test_apps/test_app/extensions/embark-service/index.js b/test_apps/test_app/extensions/embark-service/index.js index 773c00b13..fb5a56bd4 100644 --- a/test_apps/test_app/extensions/embark-service/index.js +++ b/test_apps/test_app/extensions/embark-service/index.js @@ -32,18 +32,6 @@ module.exports = function (embark) { return "web3 = new Web3(new Web3.providers.HttpProvider('http://" + options.rpcHost + ":" + options.rpcPort + "'));"; }); - /*embark.registerContractsGeneration(function (options) { - const contractGenerations = []; - Object.keys(options.contracts).map(className => { - const contract = options.contracts[className]; - const abi = JSON.stringify(contract.abiDefinition); - - contractGenerations.push(`${className} = new this.web3.eth.contract('${abi}').at('${contract.deployedAddress}')`); - }); - return contractGenerations.join('\n'); - // return ''; - });*/ - embark.registerConsoleCommand((cmd) => { if (cmd === "hello") { return "hello there!"; @@ -52,4 +40,8 @@ module.exports = function (embark) { return false; }); + embark.events.on("contractsDeployed", function() { + embark.logger.info("plugin says: your contracts have been deployed"); + }); + };