Skip to content

Commit 00f2998

Browse files
committed
feat(qui-cli): register() plugins
1 parent 7f649c7 commit 00f2998

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/qui-cli/src/cli.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Core, Options as CoreOptions } from '@battis/qui-cli.core';
33
import { Env, Options as EnvOptions } from '@battis/qui-cli.env';
44
import { Log, Options as LogOptions } from '@battis/qui-cli.log';
55
import * as plugin from '@battis/qui-cli.plugin';
6+
import * as Plugin from '@battis/qui-cli.plugin';
67
import progress from '@battis/qui-cli.progress';
78
import { Root } from '@battis/qui-cli.root';
89
import { Shell, Options as ShellOptions } from '@battis/qui-cli.shell';
@@ -22,8 +23,9 @@ export type Arguments<O extends plugin.Options = plugin.Options> =
2223
plugin.Arguments<ReturnType<Shell['options']>> &
2324
plugin.Arguments<O>;
2425

26+
const core = new Core();
27+
2528
function init({ env, args, log, shell }: Options = {}) {
26-
const core = new Core();
2729
core.register(Root.getInstance({ root: env?.root }));
2830
core.register(Colors.getInstance());
2931
core.register(Env.getInstance({ root: Root.getInstance().path(), ...env }));
@@ -42,6 +44,8 @@ function init({ env, args, log, shell }: Options = {}) {
4244
return core.init(args) as Arguments<typeof options>;
4345
}
4446

47+
export const register = core.register;
48+
4549
const defaults = {
4650
env: Env.defaults,
4751
args: Core.defaults,

0 commit comments

Comments
 (0)