move copmiler to a module
This commit is contained in:
parent
9707b0076d
commit
5bf89b0fea
|
@ -192,11 +192,7 @@ class Engine {
|
|||
deploymentService(options) {
|
||||
let self = this;
|
||||
|
||||
const Compiler = require('../contracts/compiler.js');
|
||||
let compiler = new Compiler({plugins: self.plugins, logger: self.logger});
|
||||
this.events.setCommandHandler("compiler:contracts", function(contractFiles, cb) {
|
||||
compiler.compile_contracts(contractFiles, cb);
|
||||
});
|
||||
this.registerModule('compiler', {plugins: self.plugins});
|
||||
|
||||
this.ipc = new IPC({logger: this.logger, ipcRole: options.ipcRole});
|
||||
if (this.ipc.isServer()) {
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
let async = require('../utils/async_extend.js');
|
||||
let async = require('../../utils/async_extend.js');
|
||||
|
||||
class Compiler {
|
||||
constructor(options) {
|
||||
constructor(embark, options) {
|
||||
const self = this;
|
||||
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) {
|
Loading…
Reference in New Issue