mirror of https://github.com/embarklabs/embark.git
move copmiler to a module
This commit is contained in:
parent
f589f68330
commit
69bb03d56d
|
@ -192,11 +192,7 @@ class Engine {
|
||||||
deploymentService(options) {
|
deploymentService(options) {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
const Compiler = require('../contracts/compiler.js');
|
this.registerModule('compiler', {plugins: self.plugins});
|
||||||
let compiler = new Compiler({plugins: self.plugins, logger: self.logger});
|
|
||||||
this.events.setCommandHandler("compiler:contracts", function(contractFiles, cb) {
|
|
||||||
compiler.compile_contracts(contractFiles, cb);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.ipc = new IPC({logger: this.logger, ipcRole: options.ipcRole});
|
this.ipc = new IPC({logger: this.logger, ipcRole: options.ipcRole});
|
||||||
if (this.ipc.isServer()) {
|
if (this.ipc.isServer()) {
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
let async = require('../utils/async_extend.js');
|
let async = require('../../utils/async_extend.js');
|
||||||
|
|
||||||
class Compiler {
|
class Compiler {
|
||||||
constructor(options) {
|
constructor(embark, options) {
|
||||||
|
const self = this;
|
||||||
this.plugins = options.plugins;
|
this.plugins = options.plugins;
|
||||||
this.logger = options.logger;
|
this.events = embark.events;
|
||||||
|
this.logger = embark.logger;
|
||||||
|
|
||||||
|
this.events.setCommandHandler("compiler:contracts", function(contractFiles, cb) {
|
||||||
|
self.compile_contracts(contractFiles, cb);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_contracts(contractFiles, cb) {
|
compile_contracts(contractFiles, cb) {
|
Loading…
Reference in New Issue