emizzle d4d7e3b8ac
Addressed PR comments
*Console.js*
- Moved `DEFAULT_PROCESS` const to outside of the `Console` class (but inside the module).
- Removed `(` and `)` from `.filter` in `getProcessLogs()`.
- Updated comments

*logger.js*
- Moved `dateFormat` and `logRegex` to constants outside of `Logger` class
- Moved the `parseLogFile` method inside of the `Logger` class (ES6 style)
- Added a log limit to the `parseLogFile` method
- Added the log path to the constants file and used inside of `Logger`

*cmd_controller.js*
- Defaulted `this.context` to `[constants.context.any]` in the constructor.
- Changed `’embark’` to split modules`coreProcess` and `loggerApi`.

*engine.js*
- Changed `’embark’` to split modules`coreProcess` and `loggerApi`.
2018-10-23 10:57:04 +02:00

21 lines
529 B
JavaScript

class CoreProcess {
constructor(embark) {
this.embark = embark;
this.events = embark.events;
this.registerProcess();
}
// Register 'embark' as a process
registerProcess() {
this.events.request('processes:register', 'embark', (setRunning) => {
// on 'outputDone', set 'embark' process to 'running'
this.events.on('outputDone', setRunning);
});
// set 'embark' process to 'starting'
this.events.request('processes:launch', 'embark', () => {});
}
}
module.exports = CoreProcess;