mirror of https://github.com/embarklabs/embark.git
consistent naming, quotes-style
This commit is contained in:
parent
03c51fba46
commit
103bb43a05
|
@ -73,23 +73,26 @@ class WebServer {
|
|||
|
||||
listenToCommands() {
|
||||
this.events.setCommandHandler('embark-building-placeholder', (cb) => this.buildPlaceholderPage(cb));
|
||||
this.events.setCommandHandler('start-webserver', (callback) => this.server.start(callback));
|
||||
this.events.setCommandHandler('stop-webserver', (callback) => this.server.stop(callback));
|
||||
this.events.setCommandHandler('start-webserver', (cb) => this.server.start(cb));
|
||||
this.events.setCommandHandler('stop-webserver', (cb) => this.server.stop(cb));
|
||||
}
|
||||
|
||||
registerConsoleCommands() {
|
||||
const self = this;
|
||||
self.embark.registerConsoleCommand((cmd, _options) => {
|
||||
return {
|
||||
match: () => cmd === "webserver start",
|
||||
process: (callback) => self.events.request("start-webserver", callback)
|
||||
match: () => cmd === 'webserver start',
|
||||
process: (cb) => self.events.request('start-webserver', cb)
|
||||
};
|
||||
});
|
||||
|
||||
self.embark.registerConsoleCommand((cmd, _options) => {
|
||||
return {
|
||||
match: () => cmd === "webserver stop",
|
||||
process: (callback) => self.events.request("stop-webserver", callback)
|
||||
match: () => cmd === 'webserver stop',
|
||||
process: (cb) => self.events.request('stop-webserver', cb)
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue