Skip to content

Commit 48e0083

Browse files
kizivatjycouet
andauthored
feat(cli): Create & add one go (#695)
Co-authored-by: jycouet <jycouet@gmail.com>
1 parent 4d730bd commit 48e0083

File tree

14 files changed

+566
-255
lines changed

14 files changed

+566
-255
lines changed

.changeset/smooth-foxes-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'sv': minor
3+
---
4+
5+
feat(cli): `npx sv create` now supports a new argument `--add` to add add-ons to the project in the same command.

.changeset/wide-ducks-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'sv': patch
3+
---
4+
5+
feat(cli): show args used so that you can run the cli without any prompt next time

documentation/docs/20-commands/10-sv-create.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ Whether and how to add typechecking to the project:
4141

4242
Prevent typechecking from being added. Not recommended!
4343

44+
### `--add [add-ons...]`
45+
46+
Add add-ons to the project in the `create` command. Following the same format as [sv add](sv-add#Usage).
47+
48+
Example:
49+
50+
```sh
51+
npx sv create --add eslint prettier
52+
```
53+
4454
### `--no-add-ons`
4555

4656
Run the command without the interactive add-ons prompt

packages/addons/mcp/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ export default defineAddon({
117117

118118
for (const ide of options.ide) {
119119
const value = configurator[ide];
120+
121+
if (value === undefined) continue;
120122
if ('other' in value) continue;
121123

122124
const {

0 commit comments

Comments
 (0)