consistent naming, quotes-style

This commit is contained in:
Michael Bradley, Jr 2018-09-04 07:32:31 -05:00
parent 03c51fba46
commit 103bb43a05
1 changed files with 9 additions and 6 deletions

View File

@ -73,23 +73,26 @@ class WebServer {
listenToCommands() { listenToCommands() {
this.events.setCommandHandler('embark-building-placeholder', (cb) => this.buildPlaceholderPage(cb)); this.events.setCommandHandler('embark-building-placeholder', (cb) => this.buildPlaceholderPage(cb));
this.events.setCommandHandler('start-webserver', (callback) => this.server.start(callback)); this.events.setCommandHandler('start-webserver', (cb) => this.server.start(cb));
this.events.setCommandHandler('stop-webserver', (callback) => this.server.stop(callback)); this.events.setCommandHandler('stop-webserver', (cb) => this.server.stop(cb));
} }
registerConsoleCommands() { registerConsoleCommands() {
const self = this; const self = this;
self.embark.registerConsoleCommand((cmd, _options) => { self.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => cmd === "webserver start", match: () => cmd === 'webserver start',
process: (callback) => self.events.request("start-webserver", callback) process: (cb) => self.events.request('start-webserver', cb)
}; };
}); });
self.embark.registerConsoleCommand((cmd, _options) => { self.embark.registerConsoleCommand((cmd, _options) => {
return { return {
match: () => cmd === "webserver stop", match: () => cmd === 'webserver stop',
process: (callback) => self.events.request("stop-webserver", callback) process: (cb) => self.events.request('stop-webserver', cb)
};
});
}; };
}); });
} }