From 9ef015d1f4eac31c1d0b93a4961ab10031bfad85 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Fri, 19 Jan 2018 17:02:38 -0800 Subject: [PATCH] fix: add engine properties --- src/config.ts | 4 ++++ src/engine.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/config.ts b/src/config.ts index 31c9ae81..21b45359 100644 --- a/src/config.ts +++ b/src/config.ts @@ -41,6 +41,10 @@ export interface IConfig { npmRegistry: string } +export interface ICLIConfig extends IConfig { + engine: IEngine +} + export interface TSConfig { compilerOptions: { rootDir?: string diff --git a/src/engine.ts b/src/engine.ts index 531b2aa1..02963aca 100644 --- a/src/engine.ts +++ b/src/engine.ts @@ -1,8 +1,10 @@ import {ICachedCommand} from './command' +import {ICLIConfig} from './config' import {IPlugin} from './plugin' import {ITopic} from './topic' export interface IEngine { + readonly config: ICLIConfig readonly plugins: IPlugin[] readonly topics: ITopic[] @@ -18,4 +20,6 @@ export interface IEngine { findTopic(id: string, must?: boolean): ITopic | undefined runHook(event: string, opts: T): Promise + + load(root: string): Promise }