From cc00578fe38daf0e886ccd4ee795123148f982c2 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 6 Oct 2024 08:23:57 +0200 Subject: [PATCH 01/16] sample / showcase docs --- documentation/docs/10-getting-started/10-introduction.md | 9 +++++++++ documentation/docs/10-getting-started/11-test.md | 7 +++++++ documentation/docs/10-getting-started/index.md | 3 +++ documentation/docs/20-community-adders/10-usage.md | 9 +++++++++ documentation/docs/20-community-adders/11-docs.md | 7 +++++++ documentation/docs/20-community-adders/12-submission.md | 7 +++++++ documentation/docs/20-community-adders/index.md | 3 +++ documentation/docs/index.md | 3 +++ 8 files changed, 48 insertions(+) create mode 100644 documentation/docs/10-getting-started/10-introduction.md create mode 100644 documentation/docs/10-getting-started/11-test.md create mode 100644 documentation/docs/10-getting-started/index.md create mode 100644 documentation/docs/20-community-adders/10-usage.md create mode 100644 documentation/docs/20-community-adders/11-docs.md create mode 100644 documentation/docs/20-community-adders/12-submission.md create mode 100644 documentation/docs/20-community-adders/index.md create mode 100644 documentation/docs/index.md diff --git a/documentation/docs/10-getting-started/10-introduction.md b/documentation/docs/10-getting-started/10-introduction.md new file mode 100644 index 00000000..7119daee --- /dev/null +++ b/documentation/docs/10-getting-started/10-introduction.md @@ -0,0 +1,9 @@ +--- +title: Introduction +--- + +## Before we begin + +> stuff + +# diff --git a/documentation/docs/10-getting-started/11-test.md b/documentation/docs/10-getting-started/11-test.md new file mode 100644 index 00000000..a019d30b --- /dev/null +++ b/documentation/docs/10-getting-started/11-test.md @@ -0,0 +1,7 @@ +--- +title: Test +--- + +## Test 2 + +normal text diff --git a/documentation/docs/10-getting-started/index.md b/documentation/docs/10-getting-started/index.md new file mode 100644 index 00000000..e52ac0cc --- /dev/null +++ b/documentation/docs/10-getting-started/index.md @@ -0,0 +1,3 @@ +--- +title: Getting started cli +--- diff --git a/documentation/docs/20-community-adders/10-usage.md b/documentation/docs/20-community-adders/10-usage.md new file mode 100644 index 00000000..0f736c3d --- /dev/null +++ b/documentation/docs/20-community-adders/10-usage.md @@ -0,0 +1,9 @@ +--- +title: Usage +--- + +## Before we begin + +> stuff + +# diff --git a/documentation/docs/20-community-adders/11-docs.md b/documentation/docs/20-community-adders/11-docs.md new file mode 100644 index 00000000..62478e7e --- /dev/null +++ b/documentation/docs/20-community-adders/11-docs.md @@ -0,0 +1,7 @@ +--- +title: Docs +--- + +## Test 2 + +normal text diff --git a/documentation/docs/20-community-adders/12-submission.md b/documentation/docs/20-community-adders/12-submission.md new file mode 100644 index 00000000..59f8e7be --- /dev/null +++ b/documentation/docs/20-community-adders/12-submission.md @@ -0,0 +1,7 @@ +--- +title: Submission +--- + +## Test 2asdasd + +normal text diff --git a/documentation/docs/20-community-adders/index.md b/documentation/docs/20-community-adders/index.md new file mode 100644 index 00000000..1ab3606e --- /dev/null +++ b/documentation/docs/20-community-adders/index.md @@ -0,0 +1,3 @@ +--- +title: Community adders +--- diff --git a/documentation/docs/index.md b/documentation/docs/index.md new file mode 100644 index 00000000..5f81cc86 --- /dev/null +++ b/documentation/docs/index.md @@ -0,0 +1,3 @@ +--- +title: CLI +--- From 21eed3af1452956d0df217ab584d8e54397d13d7 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 6 Oct 2024 18:57:23 +0200 Subject: [PATCH 02/16] improve --- .../docs/10-getting-started/10-commands.md | 26 +++++++++++++ .../10-getting-started/10-introduction.md | 9 ----- .../docs/10-getting-started/11-test.md | 7 ---- .../docs/10-getting-started/50-create.md | 39 +++++++++++++++++++ .../docs/10-getting-started/51-add.md | 7 ++++ .../docs/10-getting-started/index.md | 2 +- 6 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 documentation/docs/10-getting-started/10-commands.md delete mode 100644 documentation/docs/10-getting-started/10-introduction.md delete mode 100644 documentation/docs/10-getting-started/11-test.md create mode 100644 documentation/docs/10-getting-started/50-create.md create mode 100644 documentation/docs/10-getting-started/51-add.md diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md new file mode 100644 index 00000000..7c6062bf --- /dev/null +++ b/documentation/docs/10-getting-started/10-commands.md @@ -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 + +```sh +npx sv # args +pnpx sv # args +# todo +``` + +## 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 | +| migrate | `npx sv migrate {migrationName}` | Migrate your project | +| check | `npx sv check` | ??? | diff --git a/documentation/docs/10-getting-started/10-introduction.md b/documentation/docs/10-getting-started/10-introduction.md deleted file mode 100644 index 7119daee..00000000 --- a/documentation/docs/10-getting-started/10-introduction.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Introduction ---- - -## Before we begin - -> stuff - -# diff --git a/documentation/docs/10-getting-started/11-test.md b/documentation/docs/10-getting-started/11-test.md deleted file mode 100644 index a019d30b..00000000 --- a/documentation/docs/10-getting-started/11-test.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Test ---- - -## Test 2 - -normal text diff --git a/documentation/docs/10-getting-started/50-create.md b/documentation/docs/10-getting-started/50-create.md new file mode 100644 index 00000000..462cad08 --- /dev/null +++ b/documentation/docs/10-getting-started/50-create.md @@ -0,0 +1,39 @@ +--- +title: Create a project +--- + +## create + +some cool description about the `create` command and it's capabilities + +## usage + +``` +npx sv create +``` + +``` +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 +// import { create } from 'sv'; + +// // todo: check if this is right +// create(cwd, { +// // add your options here +// // todo: list available option +// }); +``` diff --git a/documentation/docs/10-getting-started/51-add.md b/documentation/docs/10-getting-started/51-add.md new file mode 100644 index 00000000..9aed638a --- /dev/null +++ b/documentation/docs/10-getting-started/51-add.md @@ -0,0 +1,7 @@ +--- +title: Customize your project +--- + +## add + +`add` stuff diff --git a/documentation/docs/10-getting-started/index.md b/documentation/docs/10-getting-started/index.md index e52ac0cc..9518c9e2 100644 --- a/documentation/docs/10-getting-started/index.md +++ b/documentation/docs/10-getting-started/index.md @@ -1,3 +1,3 @@ --- -title: Getting started cli +title: Getting started --- From 03610447074fd5aa6f77c8ff2dbd76b796b3ad09 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Tue, 8 Oct 2024 20:56:09 +0200 Subject: [PATCH 03/16] add more docs --- .../docs/10-getting-started/10-commands.md | 8 +- .../docs/10-getting-started/50-create.md | 8 +- .../docs/10-getting-started/51-add.md | 74 ++++++++++++++++++- .../docs/10-getting-started/52-migrate.md | 13 ++++ .../docs/10-getting-started/53-check.md | 17 +++++ .../docs/20-community-adders/10-usage.md | 23 +++++- .../docs/20-community-adders/11-docs.md | 12 ++- .../docs/20-community-adders/12-submission.md | 15 +++- 8 files changed, 155 insertions(+), 15 deletions(-) create mode 100644 documentation/docs/10-getting-started/52-migrate.md create mode 100644 documentation/docs/10-getting-started/53-check.md diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md index 7c6062bf..c6e9e8ea 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-getting-started/10-commands.md @@ -10,10 +10,10 @@ The svelte cli `sv` aims to combine multiple tools into one single easy to remem The best way to use our cli is to run one of the following commands, depending on your package manager -```sh -npx sv # args -pnpx sv # args -# todo +```bash +npx sv +pnpx sv +# todo: should we add other package managers or just leave npx? Same goes for all other snippets ``` ## Commands diff --git a/documentation/docs/10-getting-started/50-create.md b/documentation/docs/10-getting-started/50-create.md index 462cad08..7a690b38 100644 --- a/documentation/docs/10-getting-started/50-create.md +++ b/documentation/docs/10-getting-started/50-create.md @@ -2,17 +2,17 @@ title: Create a project --- -## create +## overview some cool description about the `create` command and it's capabilities ## usage -``` +```bash npx sv create ``` -``` +```bash npx sv create ./my/path ``` @@ -28,7 +28,7 @@ npx sv create ./my/path ## programatic interface ```js -// todo: this gives error in the docs site when commented in +// 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 diff --git a/documentation/docs/10-getting-started/51-add.md b/documentation/docs/10-getting-started/51-add.md index 9aed638a..477810a4 100644 --- a/documentation/docs/10-getting-started/51-add.md +++ b/documentation/docs/10-getting-started/51-add.md @@ -2,6 +2,76 @@ title: Customize your project --- -## add +## overview -`add` stuff +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??? diff --git a/documentation/docs/10-getting-started/52-migrate.md b/documentation/docs/10-getting-started/52-migrate.md new file mode 100644 index 00000000..01c5e17a --- /dev/null +++ b/documentation/docs/10-getting-started/52-migrate.md @@ -0,0 +1,13 @@ +--- +title: Migrate your project +--- + +## overview + +some cool description about the `migrate` command and it's capabilities + +## usage + +```bash +npx sv migrate svelte-5 +``` diff --git a/documentation/docs/10-getting-started/53-check.md b/documentation/docs/10-getting-started/53-check.md new file mode 100644 index 00000000..8988c531 --- /dev/null +++ b/documentation/docs/10-getting-started/53-check.md @@ -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 diff --git a/documentation/docs/20-community-adders/10-usage.md b/documentation/docs/20-community-adders/10-usage.md index 0f736c3d..80af57ad 100644 --- a/documentation/docs/20-community-adders/10-usage.md +++ b/documentation/docs/20-community-adders/10-usage.md @@ -4,6 +4,25 @@ title: Usage ## Before we begin -> stuff +> 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 diff --git a/documentation/docs/20-community-adders/11-docs.md b/documentation/docs/20-community-adders/11-docs.md index 62478e7e..b1f0b3f2 100644 --- a/documentation/docs/20-community-adders/11-docs.md +++ b/documentation/docs/20-community-adders/11-docs.md @@ -2,6 +2,14 @@ title: Docs --- -## Test 2 +## community adder template -normal text +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 diff --git a/documentation/docs/20-community-adders/12-submission.md b/documentation/docs/20-community-adders/12-submission.md index 59f8e7be..1f20fcb5 100644 --- a/documentation/docs/20-community-adders/12-submission.md +++ b/documentation/docs/20-community-adders/12-submission.md @@ -2,6 +2,19 @@ title: Submission --- -## Test 2asdasd +## 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 From 4ccad3e13cc5261b6bf788e8d59ff519e5f35076 Mon Sep 17 00:00:00 2001 From: Manuel <30698007+manuel3108@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:22:10 +0200 Subject: [PATCH 04/16] Update documentation/docs/10-getting-started/10-commands.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --- documentation/docs/10-getting-started/10-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md index c6e9e8ea..26b8437e 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-getting-started/10-commands.md @@ -23,4 +23,4 @@ pnpx sv | [`create`](create) | `npx sv create ./my-project` | Scaffolds new projects | | [add](add) | `npx sv add tailwindcss` | Customize your projects to add different tools | | migrate | `npx sv migrate {migrationName}` | Migrate your project | -| check | `npx sv check` | ??? | +| check | `npx sv check` | Typecheck your Svelte files | From 118d3b355e64426debcfad1584c19874671695c5 Mon Sep 17 00:00:00 2001 From: Manuel <30698007+manuel3108@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:22:22 +0200 Subject: [PATCH 05/16] Update documentation/docs/10-getting-started/10-commands.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --- documentation/docs/10-getting-started/10-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md index 26b8437e..8adbb55b 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-getting-started/10-commands.md @@ -4,7 +4,7 @@ title: Commands ## Intorduction -The svelte cli `sv` aims to combine multiple tools into one single easy to remember command. +`sv`, the Svelte CLI, aims to combine multiple tools into one single easy to remember command. ## Usage From 90903c77afb08d6fce84d8da6fe93f2add1cd7ab Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:44:07 -0700 Subject: [PATCH 06/16] copy over readmes --- .../docs/10-getting-started/52-migrate.md | 30 +++-- .../docs/10-getting-started/53-check.md | 126 ++++++++++++++++-- 2 files changed, 137 insertions(+), 19 deletions(-) diff --git a/documentation/docs/10-getting-started/52-migrate.md b/documentation/docs/10-getting-started/52-migrate.md index 01c5e17a..fa68122e 100644 --- a/documentation/docs/10-getting-started/52-migrate.md +++ b/documentation/docs/10-getting-started/52-migrate.md @@ -1,13 +1,25 @@ ---- -title: Migrate your project ---- +# sv migrate -## overview +A CLI for migrating Svelte(Kit) codebases. -some cool description about the `migrate` command and it's capabilities +Run it using -## usage - -```bash -npx sv migrate svelte-5 ``` +npx sv migrate [migration] +``` + +## Migrations + +| Migration | From | To | Guide | +| ------------- | --------------------- | --------------------- | --------------------------------------------------------------- | +| `svelte-5` | Svelte 4 | Svelte 5 | [Website](https://svelte.dev/docs/v5-migration-guide) | +| `sveltekit-2` | SvelteKit 1.0 | SvelteKit 2.0 | [Website](https://kit.svelte.dev/docs/migrating-to-sveltekit-2) | +| `svelte-4` | Svelte 3 | Svelte 4 | [Website](https://svelte.dev/docs/v4-migration-guide) | +| `package` | `@sveltejs/package@1` | `@sveltejs/package@2` | [#8922](https://github.com/sveltejs/kit/pull/8922) | +| `routes` | SvelteKit pre-1.0 | SvelteKit 1.0 | [#5774](https://github.com/sveltejs/kit/discussions/5774) | + +Some migrations may annotate your codebase with tasks for completion that you can find by searching for `@migration`. + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/migrate/CHANGELOG.md). diff --git a/documentation/docs/10-getting-started/53-check.md b/documentation/docs/10-getting-started/53-check.md index 8988c531..6f7e6875 100644 --- a/documentation/docs/10-getting-started/53-check.md +++ b/documentation/docs/10-getting-started/53-check.md @@ -1,17 +1,123 @@ ---- -title: Check your project ---- +# Check your code with sv check -## overview +Provides CLI diagnostics checks for: -some cool description about the `check` command and it's capabilities +- Unused CSS +- Svelte A11y hints +- JavaScript/TypeScript compiler errors -## usage +Requires Node 16 or later. -```bash -npx sv check +### Usage: + +#### Local / in your project + +Installation: + +`npm i svelte-check --save-dev` + +Package.json: + +```json +{ + // ... + "scripts": { + "sv": "npx sv" + // ... + }, + // ... + "devDependencies": { + "svelte-check": "..." + // ... + } +} +``` + +Usage: + +`npm run sv check` + +### Args: + +| Flag | Description | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--workspace ` | Path to your workspace. All subdirectories except node_modules and those listed in `--ignore` are checked | +| `--output ` | +| `--watch` | Will not exit after one pass but keep watching files for changes and rerun diagnostics | +| `--preserveWatchOutput` | Do not clear the screen in watch mode | +| `--tsconfig ` | Pass a path to a tsconfig or jsconfig file. The path can be relative to the workspace path or absolute. Doing this means that only files matched by the files/include/exclude pattern of the config file are diagnosed. It also means that errors from TypeScript and JavaScript files are reported. If not given, will do an upwards traversal looking for the next jsconfig/tsconfig.json | +| `--no-tsconfig` | Use this if you only want to check the Svelte files found in the current directory and below and ignore any JS/TS files (they will not be type-checked) | +| `--ignore ` | Only has an effect when used in conjunction with `--no-tsconfig`. Files/folders to ignore - relative to workspace root, comma-separated, inside quotes. Example: `--ignore "dist,build"`. When used in conjunction with `--tsconfig`, this will only have effect on the files watched, not on the files that are diagnosed, which is then determined by the `tsconfig.json` | +| `--fail-on-warnings` | Will also exit with error code when there are warnings | +| `--compiler-warnings ` | A list of Svelte compiler warning codes. Each entry defines whether that warning should be ignored or treated as an error. Warnings are comma-separated, between warning code and error level is a colon; all inside quotes. Example: `--compiler-warnings "css-unused-selector:ignore,unused-export-let:error"` | +| `--diagnostic-sources ` | A list of diagnostic sources which should run diagnostics on your code. Possible values are `js` (includes TS), `svelte`, `css`. Comma-separated, inside quotes. By default all are active. Example: `--diagnostic-sources "js,svelte"` | +| `--threshold ` | Filters the diagnostics to display. `error` will output only errors while `warning` will output warnings and errors. | + +### FAQ + +#### Why is there no option to only check specific files (for example only staged files)? + +`svelte-check` needs to know the whole project to do valid checks. Imagine you alter a component property `export let foo` to `export let bar`, but you don't update any of the component usages. They all have errors now but you would not catch them if you only run checks on changed files. + +### More docs, preprocessor setup and troubleshooting + +[See here](/docs/README.md). + +### Machine-Readable Output + +Setting the `--output` to `machine` or `machine-verbose` will format output in a way that is easier to read +by machines, e.g. inside CI pipelines, for code quality checks, etc. + +Each row corresponds to a new record. Rows are made up of columns that are separated by a +single space character. The first column of every row contains a timestamp in milliseconds +which can be used for monitoring purposes. The second column gives us the "row type", based +on which the number and types of subsequent columns may differ. + +The first row is of type `START` and contains the workspace folder (wrapped in quotes). + +###### Example: + +``` +1590680325583 START "/home/user/language-tools/packages/language-server/test/plugins/typescript/testfiles" +``` + +Any number of `ERROR` or `WARNING` records may follow. Their structure is identical and depends on the output argoument. + +If the argument is `machine` it will tell us the filename, the starting line and column numbers, and the error message. The filename is relative to the workspace directory. The filename and the message are both wrapped in quotes. + +###### Example: + +``` +1590680326283 ERROR "codeactions.svelte" 1:16 "Cannot find module 'blubb' or its corresponding type declarations." +1590680326778 WARNING "imported-file.svelte" 0:37 "Component has unused export property 'prop'. If it is for external reference only, please consider using `export const prop`" +``` + +If the argument is `machine-verbose` it will tell us the filename, the starting line and column numbers, the ending line and column numbers, the error message, the code of diagnostic, the human-friendly description of the code and the human-friendly source of the diagnostic (eg. svelte/typescript). The filename is relative to the workspace directory. Each diagnostic is represented as an [ndjson](https://en.wikipedia.org/wiki/JSON_streaming#Newline-Delimited_JSON) line prefixed by the timestamp of the log. + +###### Example: + +``` +1590680326283 {"type":"ERROR","fn":"codeaction.svelte","start":{"line":1,"character":16},"end":{"line":1,"character":23},"message":"Cannot find module 'blubb' or its corresponding type declarations.","code":2307,"source":"js"} +1590680326778 {"type":"WARNING","filename":"imported-file.svelte","start":{"line":0,"character":37},"end":{"line":0,"character":51},"message":"Component has unused export property 'prop'. If it is for external reference only, please consider using `export +const prop`","code":"unused-export-let","source":"svelte"} +``` + +The output concludes with a `COMPLETED` message that summarizes total numbers of files, errors and warnings that were encountered during the check. + +###### Example: + +``` +1590680326807 COMPLETED 20 FILES 21 ERRORS 1 WARNINGS 3 FILES_WITH_PROBLEMS +``` + +If the application experiences a runtime error, this error will appear as a `FAILURE` record. + +###### Example: + +``` +1590680328921 FAILURE "Connection closed" ``` -## notes +### Credits -some note that `svelte-check` will need to be installed locally into the project +- Vue's [VTI](https://github.com/vuejs/vetur/tree/master/vti) which laid the foundation for `svelte-check` From 9ac2409a2036b8d7b9b5fe9bc37ee82a519dcef5 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:11:43 -0700 Subject: [PATCH 07/16] capitalize headings and flesh out missing sections --- .../docs/10-getting-started/10-commands.md | 2 +- .../docs/10-getting-started/50-create.md | 10 ++-- .../docs/10-getting-started/51-add.md | 46 +++++++------------ .../docs/20-community-adders/10-usage.md | 6 +-- .../docs/20-community-adders/11-docs.md | 10 ++-- .../docs/20-community-adders/12-submission.md | 18 ++++---- 6 files changed, 39 insertions(+), 53 deletions(-) diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md index 8adbb55b..e747b78b 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-getting-started/10-commands.md @@ -2,7 +2,7 @@ title: Commands --- -## Intorduction +## Introduction `sv`, the Svelte CLI, aims to combine multiple tools into one single easy to remember command. diff --git a/documentation/docs/10-getting-started/50-create.md b/documentation/docs/10-getting-started/50-create.md index 7a690b38..a7f5e725 100644 --- a/documentation/docs/10-getting-started/50-create.md +++ b/documentation/docs/10-getting-started/50-create.md @@ -2,11 +2,11 @@ title: Create a project --- -## overview +## Overview -some cool description about the `create` command and it's capabilities +`sv create` sets up a new SvelteKit project. It also offers numerous integrations with various technologies that are commonly-used for building web sites and web apps. You can set these up later with the `add` command. -## usage +## Usage ```bash npx sv create @@ -16,7 +16,7 @@ npx sv create npx sv create ./my/path ``` -## available options +## Available options | Option | option values | default | description | | ------------- | ------------------------------- | --------- | ---------------------------------------------------------- | @@ -28,7 +28,7 @@ npx sv create ./my/path ## 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 +// TODO: this gives type checking errors in the docs site when not commented out. Need to release sv, install it in the site, and uncomment this. // import { create } from 'sv'; // // todo: check if this is right diff --git a/documentation/docs/10-getting-started/51-add.md b/documentation/docs/10-getting-started/51-add.md index 477810a4..dda8b221 100644 --- a/documentation/docs/10-getting-started/51-add.md +++ b/documentation/docs/10-getting-started/51-add.md @@ -2,11 +2,11 @@ title: Customize your project --- -## overview +## Overview -some cool description about the `add` command and it's capabilities +It also offers numerous integrations with various technologies that are commonly-used for building web sites and web apps. -## usage +## Usage ```bash npx sv add @@ -20,7 +20,7 @@ npx sv add tailwindcss npx sv add tailwindcss --cwd ./my/path ``` -## available options +## Available options | Option | option values | default | description | | ------------------ | ------------------------------------------ | ------- | -------------------------------------------- | @@ -30,31 +30,21 @@ npx sv add tailwindcss --cwd ./my/path | --no-preconditions | - | - | skips checking preconditions | | --community | [community adder names](#community-adders) | - | adds community adders | -## available adders +## Official adders -// todo: add unmerged adders +- auth +- drizzle +- eslint +- mdsvex +- paraglide +- playwright +- prettier +- routify +- storybook +- tailwindcss +- vitest -drizzle - -eslint - -lucia - -mdsvex - -playwright - -prettier - -routify - -storybook - -tailwindcss - -vitest - -## community adders +## Community adders > The Svelte maintainers have not reviewed community adders for malicious code. Use at your discretion. @@ -73,5 +63,3 @@ 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??? diff --git a/documentation/docs/20-community-adders/10-usage.md b/documentation/docs/20-community-adders/10-usage.md index 80af57ad..ee7479a9 100644 --- a/documentation/docs/20-community-adders/10-usage.md +++ b/documentation/docs/20-community-adders/10-usage.md @@ -8,7 +8,7 @@ title: Usage 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 +## Usage ```bash npx sv add --community # interactive list @@ -17,12 +17,12 @@ 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 +## 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 +- if they need to include any other dependencies they will need to do some bundling 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 diff --git a/documentation/docs/20-community-adders/11-docs.md b/documentation/docs/20-community-adders/11-docs.md index b1f0b3f2..b624dbf6 100644 --- a/documentation/docs/20-community-adders/11-docs.md +++ b/documentation/docs/20-community-adders/11-docs.md @@ -2,14 +2,12 @@ title: Docs --- -## community adder template +## 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. +We do not provide any TS template, as the types provided by all the helper methods we expose should be enough to fulfill your needs! If you still want to use TypeScript, that's totally fine as well. -## basic usage +## 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 +We have 5 common files: `index.js`, `config/adder.js`, `config/options.js`, `config/check.js`, `config/test.js`. Please check official adders for examples and do not be shy about asking questions in the GitHub issues or on Discord. diff --git a/documentation/docs/20-community-adders/12-submission.md b/documentation/docs/20-community-adders/12-submission.md index 1f20fcb5..2b919e4f 100644 --- a/documentation/docs/20-community-adders/12-submission.md +++ b/documentation/docs/20-community-adders/12-submission.md @@ -2,19 +2,19 @@ title: Submission --- -## overview +## Overview -normal text +Community adders are still in development. We'd love to help get the first few released. Please open an issue or find us on Discord to discuss how to develop your adder and get it included. -## requirements +## 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 +- must benefit the overall ecosystem and community rather than being individually tailored +- should be a best-in-class tool that is ideally widely used in the community +- open source tools are generally preferred to commercial offerings -## process +## Process - create a fork of `sveltejs/cli` -- modify file `todo` to add your community adder +- modify the community manifest file to list your adder (TODO: this file does not exist yet) - 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 +- wait for the the next release of `sv` From 4e69aa1832a921d996ddf8ad4ee7f1cca5e4b7ee Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:12:25 -0700 Subject: [PATCH 08/16] Update documentation/docs/10-getting-started/10-commands.md --- documentation/docs/10-getting-started/10-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md index e747b78b..2ed79d4f 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-getting-started/10-commands.md @@ -22,5 +22,5 @@ pnpx sv | ------------------ | -------------------------------- | ---------------------------------------------- | | [`create`](create) | `npx sv create ./my-project` | Scaffolds new projects | | [add](add) | `npx sv add tailwindcss` | Customize your projects to add different tools | -| migrate | `npx sv migrate {migrationName}` | Migrate your project | +| migrate | `npx sv migrate ` | Migrate your project | | check | `npx sv check` | Typecheck your Svelte files | From 89d6b10ba612e314e37a427287d7cbc278e1d980 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:12:53 -0700 Subject: [PATCH 09/16] Update documentation/docs/10-getting-started/10-commands.md --- documentation/docs/10-getting-started/10-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-getting-started/10-commands.md index 2ed79d4f..b618d877 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-getting-started/10-commands.md @@ -21,6 +21,6 @@ pnpx sv | 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 | +| [add](add) | `npx sv add [adder...]` | Customize your projects to add different tools | | migrate | `npx sv migrate ` | Migrate your project | | check | `npx sv check` | Typecheck your Svelte files | From dae3f60ff7267d13ba431c0cd06560fa1dd065b3 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 10 Oct 2024 13:30:24 -0400 Subject: [PATCH 10/16] make migrate/check documents valid, make titles consistent --- .../docs/10-getting-started/50-create.md | 2 +- .../docs/10-getting-started/51-add.md | 2 +- .../docs/10-getting-started/52-migrate.md | 4 ++- .../docs/10-getting-started/53-check.md | 32 ++++++++++--------- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/documentation/docs/10-getting-started/50-create.md b/documentation/docs/10-getting-started/50-create.md index a7f5e725..a4d1170c 100644 --- a/documentation/docs/10-getting-started/50-create.md +++ b/documentation/docs/10-getting-started/50-create.md @@ -1,5 +1,5 @@ --- -title: Create a project +title: sv create --- ## Overview diff --git a/documentation/docs/10-getting-started/51-add.md b/documentation/docs/10-getting-started/51-add.md index dda8b221..9f94ff93 100644 --- a/documentation/docs/10-getting-started/51-add.md +++ b/documentation/docs/10-getting-started/51-add.md @@ -1,5 +1,5 @@ --- -title: Customize your project +title: sv add --- ## Overview diff --git a/documentation/docs/10-getting-started/52-migrate.md b/documentation/docs/10-getting-started/52-migrate.md index fa68122e..7550b446 100644 --- a/documentation/docs/10-getting-started/52-migrate.md +++ b/documentation/docs/10-getting-started/52-migrate.md @@ -1,4 +1,6 @@ -# sv migrate +--- +title: sv migrate +--- A CLI for migrating Svelte(Kit) codebases. diff --git a/documentation/docs/10-getting-started/53-check.md b/documentation/docs/10-getting-started/53-check.md index 6f7e6875..5a2dba5c 100644 --- a/documentation/docs/10-getting-started/53-check.md +++ b/documentation/docs/10-getting-started/53-check.md @@ -1,10 +1,12 @@ -# Check your code with sv check +--- +title: sv check +--- Provides CLI diagnostics checks for: -- Unused CSS -- Svelte A11y hints -- JavaScript/TypeScript compiler errors +- Unused CSS +- Svelte A11y hints +- JavaScript/TypeScript compiler errors Requires Node 16 or later. @@ -20,16 +22,16 @@ Package.json: ```json { - // ... - "scripts": { - "sv": "npx sv" - // ... - }, - // ... - "devDependencies": { - "svelte-check": "..." - // ... - } + // ... + "scripts": { + "sv": "npx sv" + // ... + }, + // ... + "devDependencies": { + "svelte-check": "..." + // ... + } } ``` @@ -120,4 +122,4 @@ If the application experiences a runtime error, this error will appear as a `FAI ### Credits -- Vue's [VTI](https://github.com/vuejs/vetur/tree/master/vti) which laid the foundation for `svelte-check` +- Vue's [VTI](https://github.com/vuejs/vetur/tree/master/vti) which laid the foundation for `svelte-check` From beacf93c280ec0aa3b04ae168c8854470bff58ea Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 10 Oct 2024 13:56:14 -0400 Subject: [PATCH 11/16] restructure --- cli | 1 + documentation/docs/10-getting-started/index.md | 3 --- .../10-commands.md => 10-introduction/10-overview.md} | 6 ++---- documentation/docs/10-introduction/index.md | 3 +++ .../50-create.md => 20-commands/10-create.md} | 0 .../{10-getting-started/51-add.md => 20-commands/20-add.md} | 0 .../53-check.md => 20-commands/30-check.md} | 0 .../52-migrate.md => 20-commands/40-migrate.md} | 0 documentation/docs/20-commands/index.md | 3 +++ .../10-usage.md | 0 .../11-docs.md => 30-community-adders/20-docs.md} | 0 .../30-submission.md} | 2 -- .../{20-community-adders => 30-community-adders}/index.md | 0 13 files changed, 9 insertions(+), 9 deletions(-) create mode 120000 cli delete mode 100644 documentation/docs/10-getting-started/index.md rename documentation/docs/{10-getting-started/10-commands.md => 10-introduction/10-overview.md} (92%) create mode 100644 documentation/docs/10-introduction/index.md rename documentation/docs/{10-getting-started/50-create.md => 20-commands/10-create.md} (100%) rename documentation/docs/{10-getting-started/51-add.md => 20-commands/20-add.md} (100%) rename documentation/docs/{10-getting-started/53-check.md => 20-commands/30-check.md} (100%) rename documentation/docs/{10-getting-started/52-migrate.md => 20-commands/40-migrate.md} (100%) create mode 100644 documentation/docs/20-commands/index.md rename documentation/docs/{20-community-adders => 30-community-adders}/10-usage.md (100%) rename documentation/docs/{20-community-adders/11-docs.md => 30-community-adders/20-docs.md} (100%) rename documentation/docs/{20-community-adders/12-submission.md => 30-community-adders/30-submission.md} (98%) rename documentation/docs/{20-community-adders => 30-community-adders}/index.md (100%) diff --git a/cli b/cli new file mode 120000 index 00000000..dbd43d78 --- /dev/null +++ b/cli @@ -0,0 +1 @@ +repos/cli \ No newline at end of file diff --git a/documentation/docs/10-getting-started/index.md b/documentation/docs/10-getting-started/index.md deleted file mode 100644 index 9518c9e2..00000000 --- a/documentation/docs/10-getting-started/index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Getting started ---- diff --git a/documentation/docs/10-getting-started/10-commands.md b/documentation/docs/10-introduction/10-overview.md similarity index 92% rename from documentation/docs/10-getting-started/10-commands.md rename to documentation/docs/10-introduction/10-overview.md index b618d877..d8328e59 100644 --- a/documentation/docs/10-getting-started/10-commands.md +++ b/documentation/docs/10-introduction/10-overview.md @@ -1,9 +1,7 @@ --- -title: Commands +title: Overview --- -## Introduction - `sv`, the Svelte CLI, aims to combine multiple tools into one single easy to remember command. ## Usage @@ -23,4 +21,4 @@ pnpx sv | [`create`](create) | `npx sv create ./my-project` | Scaffolds new projects | | [add](add) | `npx sv add [adder...]` | Customize your projects to add different tools | | migrate | `npx sv migrate ` | Migrate your project | -| check | `npx sv check` | Typecheck your Svelte files | +| check | `npx sv check` | Typecheck your Svelte files | diff --git a/documentation/docs/10-introduction/index.md b/documentation/docs/10-introduction/index.md new file mode 100644 index 00000000..8f14f7a7 --- /dev/null +++ b/documentation/docs/10-introduction/index.md @@ -0,0 +1,3 @@ +--- +title: Introduction +--- diff --git a/documentation/docs/10-getting-started/50-create.md b/documentation/docs/20-commands/10-create.md similarity index 100% rename from documentation/docs/10-getting-started/50-create.md rename to documentation/docs/20-commands/10-create.md diff --git a/documentation/docs/10-getting-started/51-add.md b/documentation/docs/20-commands/20-add.md similarity index 100% rename from documentation/docs/10-getting-started/51-add.md rename to documentation/docs/20-commands/20-add.md diff --git a/documentation/docs/10-getting-started/53-check.md b/documentation/docs/20-commands/30-check.md similarity index 100% rename from documentation/docs/10-getting-started/53-check.md rename to documentation/docs/20-commands/30-check.md diff --git a/documentation/docs/10-getting-started/52-migrate.md b/documentation/docs/20-commands/40-migrate.md similarity index 100% rename from documentation/docs/10-getting-started/52-migrate.md rename to documentation/docs/20-commands/40-migrate.md diff --git a/documentation/docs/20-commands/index.md b/documentation/docs/20-commands/index.md new file mode 100644 index 00000000..877406c0 --- /dev/null +++ b/documentation/docs/20-commands/index.md @@ -0,0 +1,3 @@ +--- +title: Commands +--- diff --git a/documentation/docs/20-community-adders/10-usage.md b/documentation/docs/30-community-adders/10-usage.md similarity index 100% rename from documentation/docs/20-community-adders/10-usage.md rename to documentation/docs/30-community-adders/10-usage.md diff --git a/documentation/docs/20-community-adders/11-docs.md b/documentation/docs/30-community-adders/20-docs.md similarity index 100% rename from documentation/docs/20-community-adders/11-docs.md rename to documentation/docs/30-community-adders/20-docs.md diff --git a/documentation/docs/20-community-adders/12-submission.md b/documentation/docs/30-community-adders/30-submission.md similarity index 98% rename from documentation/docs/20-community-adders/12-submission.md rename to documentation/docs/30-community-adders/30-submission.md index 2b919e4f..b86db0b4 100644 --- a/documentation/docs/20-community-adders/12-submission.md +++ b/documentation/docs/30-community-adders/30-submission.md @@ -2,8 +2,6 @@ title: Submission --- -## Overview - Community adders are still in development. We'd love to help get the first few released. Please open an issue or find us on Discord to discuss how to develop your adder and get it included. ## Requirements diff --git a/documentation/docs/20-community-adders/index.md b/documentation/docs/30-community-adders/index.md similarity index 100% rename from documentation/docs/20-community-adders/index.md rename to documentation/docs/30-community-adders/index.md From 1c08b259c531e48e6ae8521b65acdfd35ab67387 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 10 Oct 2024 15:39:38 -0400 Subject: [PATCH 12/16] update some stuff --- documentation/docs/10-introduction/10-overview.md | 15 +++------------ .../20-commands/{10-create.md => 10-sv-create.md} | 4 +--- .../docs/20-commands/{20-add.md => 20-sv-add.md} | 4 +--- .../20-commands/{30-check.md => 30-sv-check.md} | 0 .../{40-migrate.md => 40-sv-migrate.md} | 0 5 files changed, 5 insertions(+), 18 deletions(-) rename documentation/docs/20-commands/{10-create.md => 10-sv-create.md} (83%) rename documentation/docs/20-commands/{20-add.md => 20-sv-add.md} (92%) rename documentation/docs/20-commands/{30-check.md => 30-sv-check.md} (100%) rename documentation/docs/20-commands/{40-migrate.md => 40-sv-migrate.md} (100%) diff --git a/documentation/docs/10-introduction/10-overview.md b/documentation/docs/10-introduction/10-overview.md index d8328e59..6928e186 100644 --- a/documentation/docs/10-introduction/10-overview.md +++ b/documentation/docs/10-introduction/10-overview.md @@ -2,23 +2,14 @@ title: Overview --- -`sv`, the Svelte CLI, aims to combine multiple tools into one single easy to remember command. +The command line interface (CLI), `sv`, is a toolkit for creating and maintaining Svelte applications. ## Usage -The best way to use our cli is to run one of the following commands, depending on your package manager +The easiest way to run `sv` is with [`npx`](https://docs.npmjs.com/cli/v8/commands/npx) (or the equivalent command if you're using a different package manager — for example, `pnpx` if you're using [pnpm](https://pnpm.io/)): ```bash npx sv -pnpx sv -# 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 [adder...]` | Customize your projects to add different tools | -| migrate | `npx sv migrate ` | Migrate your project | -| check | `npx sv check` | Typecheck your Svelte files | +If you're inside a project where `sv` is already installed, this will use the local installation, otherwise it will download the latest version and run it without installing it, which is particularly useful for [`sv create`](sv-create). diff --git a/documentation/docs/20-commands/10-create.md b/documentation/docs/20-commands/10-sv-create.md similarity index 83% rename from documentation/docs/20-commands/10-create.md rename to documentation/docs/20-commands/10-sv-create.md index a4d1170c..de3ed51b 100644 --- a/documentation/docs/20-commands/10-create.md +++ b/documentation/docs/20-commands/10-sv-create.md @@ -2,9 +2,7 @@ title: sv create --- -## Overview - -`sv create` sets up a new SvelteKit project. It also offers numerous integrations with various technologies that are commonly-used for building web sites and web apps. You can set these up later with the `add` command. +`sv create` sets up a new SvelteKit project, with options to install [adders](sv-add#Official-adders). ## Usage diff --git a/documentation/docs/20-commands/20-add.md b/documentation/docs/20-commands/20-sv-add.md similarity index 92% rename from documentation/docs/20-commands/20-add.md rename to documentation/docs/20-commands/20-sv-add.md index 9f94ff93..6d4617be 100644 --- a/documentation/docs/20-commands/20-add.md +++ b/documentation/docs/20-commands/20-sv-add.md @@ -2,9 +2,7 @@ title: sv add --- -## Overview - -It also offers numerous integrations with various technologies that are commonly-used for building web sites and web apps. +`sv add` installs adders to an existing project. ## Usage diff --git a/documentation/docs/20-commands/30-check.md b/documentation/docs/20-commands/30-sv-check.md similarity index 100% rename from documentation/docs/20-commands/30-check.md rename to documentation/docs/20-commands/30-sv-check.md diff --git a/documentation/docs/20-commands/40-migrate.md b/documentation/docs/20-commands/40-sv-migrate.md similarity index 100% rename from documentation/docs/20-commands/40-migrate.md rename to documentation/docs/20-commands/40-sv-migrate.md From b24603980465f941b57b4fb21c2e41a828eb6377 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:04:48 -0700 Subject: [PATCH 13/16] Update documentation/docs/30-community-adders/30-submission.md --- documentation/docs/30-community-adders/30-submission.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/30-community-adders/30-submission.md b/documentation/docs/30-community-adders/30-submission.md index b86db0b4..89e34b57 100644 --- a/documentation/docs/30-community-adders/30-submission.md +++ b/documentation/docs/30-community-adders/30-submission.md @@ -13,6 +13,6 @@ Community adders are still in development. We'd love to help get the first few r ## Process - create a fork of `sveltejs/cli` -- modify the community manifest file to list your adder (TODO: this file does not exist yet) +- list your file in the `community-adders` directory - create a PR - wait for the the next release of `sv` From ca38e40b32aa713fc7d921fc2b483541d283ea75 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:05:52 -0700 Subject: [PATCH 14/16] Update documentation/docs/20-commands/10-sv-create.md --- documentation/docs/20-commands/10-sv-create.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/20-commands/10-sv-create.md b/documentation/docs/20-commands/10-sv-create.md index de3ed51b..0145e198 100644 --- a/documentation/docs/20-commands/10-sv-create.md +++ b/documentation/docs/20-commands/10-sv-create.md @@ -23,7 +23,7 @@ npx sv create ./my/path | --no-adders | - | - | skips interactive adder installer | | --no-install | - | - | skips installing dependencies | -## programatic interface +## Programmatic interface ```js // TODO: this gives type checking errors in the docs site when not commented out. Need to release sv, install it in the site, and uncomment this. From 99daddbe25cb0bcd5ee8a2c093dcaaa8abd43c42 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:12:46 -0700 Subject: [PATCH 15/16] we don't install adders --- documentation/docs/20-commands/10-sv-create.md | 2 +- documentation/docs/20-commands/20-sv-add.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/docs/20-commands/10-sv-create.md b/documentation/docs/20-commands/10-sv-create.md index 0145e198..dda153d5 100644 --- a/documentation/docs/20-commands/10-sv-create.md +++ b/documentation/docs/20-commands/10-sv-create.md @@ -2,7 +2,7 @@ title: sv create --- -`sv create` sets up a new SvelteKit project, with options to install [adders](sv-add#Official-adders). +`sv create` sets up a new SvelteKit project, with options to [setup additional functionality](sv-add#Official-adders). ## Usage diff --git a/documentation/docs/20-commands/20-sv-add.md b/documentation/docs/20-commands/20-sv-add.md index 6d4617be..1bf6579e 100644 --- a/documentation/docs/20-commands/20-sv-add.md +++ b/documentation/docs/20-commands/20-sv-add.md @@ -2,7 +2,7 @@ title: sv add --- -`sv add` installs adders to an existing project. +`sv add` updates your code to add news functionality to an existing project. ## Usage From 0fd19080a2b21ef40fdf47b21e74993cb2f0855d Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:13:43 -0700 Subject: [PATCH 16/16] typo --- documentation/docs/20-commands/20-sv-add.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/20-commands/20-sv-add.md b/documentation/docs/20-commands/20-sv-add.md index 1bf6579e..5a96e06b 100644 --- a/documentation/docs/20-commands/20-sv-add.md +++ b/documentation/docs/20-commands/20-sv-add.md @@ -2,7 +2,7 @@ title: sv add --- -`sv add` updates your code to add news functionality to an existing project. +`sv add` updates your code to add new functionality to an existing project. ## Usage