Skip to content

Commit 3c5b285

Browse files
authored
feat: export createRunOptions func (#7471)
1 parent f939f72 commit 3c5b285

File tree

1 file changed

+8
-3
lines changed
  • packages/solutions/app-tools/src/run

1 file changed

+8
-3
lines changed

packages/solutions/app-tools/src/run/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface RunOptions {
1515
initialLog?: string;
1616
version: string;
1717
}
18-
export async function run({
18+
export async function createRunOptions({
1919
cwd,
2020
initialLog,
2121
metaName = 'modern-js',
@@ -83,12 +83,17 @@ export async function run({
8383

8484
const plugins = await loadInternalPlugins(appDirectory, internalPlugins);
8585

86-
await CLIPluginRun({
86+
return {
8787
cwd,
8888
initialLog: initialLog || `Modern.js Framework v${version}`,
8989
configFile: finalConfigFile,
9090
metaName,
9191
internalPlugins: plugins,
9292
handleSetupResult,
93-
});
93+
};
94+
}
95+
96+
export async function run(options: RunOptions) {
97+
const runOptions = await createRunOptions(options);
98+
await CLIPluginRun(runOptions);
9499
}

0 commit comments

Comments
 (0)