diff --git a/packages/embark-compiler/src/index.ts b/packages/embark-compiler/src/index.ts index 37a57beaa..e93a71684 100644 --- a/packages/embark-compiler/src/index.ts +++ b/packages/embark-compiler/src/index.ts @@ -13,7 +13,8 @@ class Compiler { this.plugins = options.plugins; this.isCoverage = options.isCoverage; - embark.events.setCommandHandler("compiler:contracts", this.compile_contracts.bind(this)); + // embark.events.setCommandHandler("compiler:contracts", this.compile_contracts.bind(this)); + embark.events.setCommandHandler("compiler:contracts:compile", this.compile_contracts.bind(this)); } private compile_contracts(contractFiles: any[], cb: any) { diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js index 799ee0b0c..3486a0c5e 100644 --- a/packages/embark/src/cmd/cmd_controller.js +++ b/packages/embark/src/cmd/cmd_controller.js @@ -163,8 +163,8 @@ class EmbarkController { engine.registerModuleGroup("coreComponents"); - // engine.registerModuleGroup("blockchain"); - // engine.registerModuleGroup("compiler"); + engine.registerModuleGroup("blockchain"); + engine.registerModuleGroup("compiler"); // engine.startService("processManager"); // engine.startService("web3"); @@ -205,6 +205,14 @@ class EmbarkController { engine.startEngine(() => { callback(); + + engine.events.request("config:contractsFiles", (contractsFiles) => { + engine.events.request("compiler:contracts:compile", contractsFiles, (err, compiledContracts) => { + console.dir("compilation done") + console.dir(compiledContracts) + }) + }) + }); }, function startDashboard(callback) { diff --git a/packages/embark/src/lib/core/engine.js b/packages/embark/src/lib/core/engine.js index 3ae711478..00cac9894 100644 --- a/packages/embark/src/lib/core/engine.js +++ b/packages/embark/src/lib/core/engine.js @@ -123,6 +123,9 @@ class Engine { logger: this.logger, config: this.config }); + + // TODO: we shouldn't need useDashboard + this.registerModulePackage('embark-library-manager', {useDashboard: this.useDashboard}); } blockchainComponents() {