Skip to content

Commit 4114665

Browse files
author
Sean Roberts
committed
alias for sites:create
1 parent b6ae4f5 commit 4114665

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

docs/commands/sites.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ netlify sites:create
5858
- `name` (*string*) - name of project
5959
- `debug` (*boolean*) - Print debugging information
6060
- `auth` (*string*) - Netlify auth token - can be used to run this command without logging in
61+
- `prompt` (*string*) - description of the site to create (delegates to `netlify create`)
6162
- `with-ci` (*boolean*) - initialize CI hooks during project creation
6263

6364
---

src/commands/sites/sites.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ Create a blank project that isn't associated with any git remote. Will link the
2929
.option('-c, --with-ci', 'initialize CI hooks during project creation')
3030
.option('-m, --manual', 'force manual CI setup. Used --with-ci flag')
3131
.option('--disable-linking', 'create the project without linking it to current directory')
32+
.option('-p, --prompt <prompt>', 'description of the site to create (delegates to `netlify create`)')
3233
.addHelpText(
3334
'after',
3435
`Create a blank project that isn't associated with any git remote. Will link the project to the current working directory.`,
3536
)
3637
.action(async (options: OptionValues, command: BaseCommand) => {
38+
if (options.prompt) {
39+
const { createAction } = await import('../create/create-action.js')
40+
await createAction('', options, command)
41+
return
42+
}
3743
const { sitesCreate } = await import('./sites-create.js')
3844
await sitesCreate(options, command)
3945
})

0 commit comments

Comments
 (0)