-
-
Notifications
You must be signed in to change notification settings - Fork 47
draft: chore: add docs #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cc00578
sample / showcase docs
manuel3108 21eed3a
improve
manuel3108 0361044
add more docs
manuel3108 4ccad3e
Update documentation/docs/10-getting-started/10-commands.md
manuel3108 118d3b3
Update documentation/docs/10-getting-started/10-commands.md
manuel3108 90903c7
copy over readmes
benmccann 9ac2409
capitalize headings and flesh out missing sections
benmccann 4e69aa1
Update documentation/docs/10-getting-started/10-commands.md
benmccann 89d6b10
Update documentation/docs/10-getting-started/10-commands.md
benmccann dae3f60
make migrate/check documents valid, make titles consistent
Rich-Harris beacf93
restructure
Rich-Harris 1c08b25
update some stuff
Rich-Harris b246039
Update documentation/docs/30-community-adders/30-submission.md
benmccann ca38e40
Update documentation/docs/20-commands/10-sv-create.md
benmccann 99daddb
8000
we don't install adders
benmccann 0fd1908
typo
benmccann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Commands | ||
--- | ||
|
||
## Intorduction | ||
|
||
The svelte cli `sv` aims to combine multiple tools into one single easy to remember command. | ||
|
||
## Usage | ||
|
||
The best way to use our cli is to run one of the following commands, depending on your package manager | ||
|
||
```bash | ||
npx sv <command> <args> | ||
pnpx sv <command> <args> | ||
# todo: should we add other package managers or just leave npx? Same goes for all other snippets | ||
``` | ||
|
||
## Commands | ||
|
||
| Command | Sample usage | Description | | ||
| ------------------ | -------------------------------- | ---------------------------------------------- | | ||
| [`create`](create) | `npx sv create ./my-project` | Scaffolds new projects | | ||
| [add](add) | `npx sv add tailwindcss` | Customize your projects to add different tools | | ||
benmccann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| migrate | `npx sv migrate {migrationName}` | Migrate your project | | ||
benmccann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| check | `npx sv check` | ??? | | ||
manuel3108 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Create a project | ||
--- | ||
|
||
## overview | ||
|
||
some cool description about the `create` command and it's capabilities | ||
|
||
## usage | ||
|
||
```bash | ||
npx sv create | ||
``` | ||
|
||
```bash | ||
npx sv create ./my/path | ||
``` | ||
|
||
## available options | ||
|
||
| Option | option values | default | description | | ||
| ------------- | ------------------------------- | --------- | ---------------------------------------------------------- | | ||
| --check-types | typescript \| checkjs \| none | typescipt | determine if type checking should be added to this project | | ||
| --template | skeleton \| skeletonlib \| demo | skeleton | project template | | ||
| --no-adders | - | - | skips interactive adder installer | | ||
| --no-install | - | - | skips installing dependencies | | ||
|
||
## programatic interface | ||
|
||
```js | ||
// todo: this gives error in the docs site when commented in, seems to be related that this package is not published to the registry at this point in time, as it seems to be trying to check types | ||
// import { create } from 'sv'; | ||
|
||
// // todo: check if this is right | ||
// create(cwd, { | ||
// // add your options here | ||
// // todo: list available option | ||
// }); | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: Customize your project | ||
--- | ||
|
||
## overview | ||
|
||
some cool description about the `add` command and it's capabilities | ||
|
||
## usage | ||
|
||
```bash | ||
npx sv add | ||
``` | ||
|
||
```bash | ||
npx sv add tailwindcss | ||
``` | ||
|
||
```bash | ||
npx sv add tailwindcss --cwd ./my/path | ||
``` | ||
|
||
## available options | ||
|
||
| Option | option values | default | description | | ||
| ------------------ | ------------------------------------------ | ------- | -------------------------------------------- | | ||
| -C, --cwd | - | ./ | path to the root of your svelte(kit) project | | ||
| --no-install | - | - | skips installing dependencies | | ||
| --no-preconditions | - | - | skips checking preconditions | | ||
| --no-preconditions | - | - | skips checking preconditions | | ||
| --community | [community adder names](#community-adders) | - | adds community adders | | ||
|
||
## available adders | ||
|
||
// todo: add unmerged adders | ||
|
||
drizzle | ||
|
||
eslint | ||
|
||
lucia | ||
|
||
mdsvex | ||
|
||
playwright | ||
|
||
prettier | ||
|
||
routify | ||
|
||
storybook | ||
|
||
tailwindcss | ||
|
||
vitest | ||
|
||
## community adders | ||
|
||
> The Svelte maintainers have not reviewed community adders for malicious code. Use at your discretion. | ||
|
||
```bash | ||
npx sv add --community # interactive community adder selection | ||
``` | ||
|
||
```bash | ||
npx sv add --community shadcn-svelte #test | ||
``` | ||
|
||
```bash | ||
npx sv add --community shadcn-svelte --cwd ./my/path | ||
``` | ||
|
||
```bash | ||
npx sv add --community npm:your-custom-adder-published-to-npm --cwd ./my/path | ||
``` | ||
|
||
// todo: list of community adders??? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Migrate your project | ||
benmccann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--- | ||
|
||
## overview | ||
|
||
some cool description about the `migrate` command and it's capabilities | ||
|
||
## usage | ||
|
||
```bash | ||
npx sv migrate svelte-5 | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Check your project | ||
--- | ||
|
||
## overview | ||
|
||
some cool description about the `check` command and it's capabilities | ||
|
||
## usage | ||
|
||
```bash | ||
npx sv check | ||
``` | ||
|
||
## notes | ||
|
||
some note that `svelte-check` will need to be installed locally into the project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Getting started | ||
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Usage | ||
--- | ||
|
||
## Before we begin | ||
|
||
> The Svelte maintainers have not reviewed community adders for malicious code. Use at your discretion. | ||
|
||
That being said, we still want the community to be able to enhance the experience while creating new projects. That's why everyone is allowed to create community adders. The documentation for creating a new community adder can be found [here](docs) | ||
|
||
## usage | ||
|
||
```bash | ||
npx sv add --community # interactive list | ||
npx sv add --community supabase # apply supabase adder | ||
npx sv add --community npm:your-npm-package # apply any adder from npm | ||
npx sv add --community file:./path-to-your-adder # for local testing | ||
``` | ||
|
||
## requirements | ||
|
||
technical requirements: | ||
|
||
- all adders must have exactly one dependency: `@sveltejs/add-core` | ||
- if they need to include any other dependencies they will need to do some bundeling on their side | ||
- the major version of the referenced `@sveltejs/add-core` library must match with the major version `sv` the user is currently executing | ||
|
||
See [submission](submission#requirements) to find additional requirements if you want list your community adder inside `sv` for the ease of use of other community members |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Docs | ||
--- | ||
|
||
## community adder template | ||
|
||
We have a [community adder template](https://github.com/sveltejs/cli/tree/main/community-adder-template) that lives inside our GitHub monorepo. This should be a starting point for all new community adders. | ||
|
||
We do not provide any TS template, as the types provided by all the helper methods we expose should be enough to fullfill your needs! If you still want to use typescript, nobody will prevent you. | ||
|
||
## basic usage | ||
|
||
add example usage for our 5 common files (index.js, config/adder.js, config/options.js, config/check.js, config/test.js) and explain what they are. Ommitted at this point, since the code templates do not work | ||
|
||
Do we need to explain more? I think most of the things should be pretty self explanatory and can be added on demand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Submission | ||
--- | ||
|
||
## overview | ||
|
||
normal text | ||
|
||
## requirements | ||
|
||
- must benefit the overall svelte ecosystem and the community | ||
- must not be too specific to one presons needs | ||
- todo: whatever else we can think of | ||
|
||
## process | ||
|
||
- create a fork of `sveltejs/cli` | ||
- modify file `todo` to add your community adder | ||
- create a PR | ||
- once merged, it might take a while before we draft a new release of `sv`, only then your new community adder will be available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Community adders | ||
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: CLI | ||
--- |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.