Skip to content

Commit

Permalink
feat(create-waku): --template option (#1238)
Browse files Browse the repository at this point in the history
Also related to #1208. I didn't realize template was different from
example.

Co-authored-by: Daishi Kato <[email protected]>
  • Loading branch information
rmarscher and dai-shi authored Feb 17, 2025
1 parent 51961d0 commit 3c95bf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/create-waku/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ const { values } = parseArgs({
choose: {
type: 'boolean',
},
template: {
type: 'string',
},
example: {
type: 'string',
},
Expand Down Expand Up @@ -154,7 +157,7 @@ async function doPrompts() {
return {
...result,
packageName: result.packageName ?? toValidPackageName(targetDir),
templateName: result.templateName ?? templateNames[0],
templateName: result.templateName ?? values.template ?? templateNames[0],
targetDir,
};
} catch (err) {
Expand All @@ -171,6 +174,7 @@ Usage: ${commands.create} [options]
Options:
--choose Choose from the template list
--template Specify a template
--example Specify an example use as a template
--project-name Specify a project name
-h, --help Display this help message
Expand Down

0 comments on commit 3c95bf5

Please sign in to comment.