Skip to content

Commit beb9978

Browse files
nyqykknyqykk
andauthored
feat: allow to custom note information (#39)
Co-authored-by: nyqykk <nieyan.kk@bytedance.com>
1 parent c7c4713 commit beb9978

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export async function create({
157157
getTemplateName,
158158
mapESLintTemplate,
159159
version,
160+
noteInformation,
160161
}: {
161162
name: string;
162163
root: string;
@@ -165,6 +166,7 @@ export async function create({
165166
getTemplateName: (argv: Argv) => Promise<string>;
166167
mapESLintTemplate: (templateName: string) => ESLintTemplateName | null;
167168
version?: Record<string, string> | string;
169+
noteInformation?: string[];
168170
}) {
169171
const argv = minimist<Argv>(process.argv.slice(2), {
170172
alias: { h: 'help', d: 'dir', t: 'template' },
@@ -300,12 +302,14 @@ export async function create({
300302
}
301303
}
302304

303-
const nextSteps = [
304-
`1. ${color.cyan(`cd ${targetDir}`)}`,
305-
`2. ${color.cyan('git init')} ${color.dim('(optional)')}`,
306-
`3. ${color.cyan(`${pkgManager} install`)}`,
307-
`4. ${color.cyan(`${pkgManager} run dev`)}`,
308-
];
305+
const nextSteps = noteInformation?.length
306+
? noteInformation
307+
: [
308+
`1. ${color.cyan(`cd ${targetDir}`)}`,
309+
`2. ${color.cyan('git init')} ${color.dim('(optional)')}`,
310+
`3. ${color.cyan(`${pkgManager} install`)}`,
311+
`4. ${color.cyan(`${pkgManager} run dev`)}`,
312+
];
309313

310314
note(nextSteps.map((step) => color.reset(step)).join('\n'), 'Next steps');
311315

0 commit comments

Comments
 (0)