From a7947f6fbf29b3cfa009c48eac3d6336cb9f6acd Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Thu, 28 Mar 2024 19:49:46 +0100 Subject: [PATCH] feat(website): add documentation --- website/src/lib/Codeblock.svelte | 2 +- website/src/routes/+layout.svelte | 1 + website/src/routes/docs/+page.svelte | 240 +++++++++++++++++++++++++++ website/src/routes/docs/Note.svelte | 10 ++ 4 files changed, 252 insertions(+), 1 deletion(-) create mode 100644 website/src/routes/docs/+page.svelte create mode 100644 website/src/routes/docs/Note.svelte diff --git a/website/src/lib/Codeblock.svelte b/website/src/lib/Codeblock.svelte index cf223d5..ab19d56 100644 --- a/website/src/lib/Codeblock.svelte +++ b/website/src/lib/Codeblock.svelte @@ -8,7 +8,7 @@ {#await codeToHtml(code, { theme: 'vesper', lang, transformers: [{ pre(node) { - this.addClassToHast(node, 'not-prose'); + this.addClassToHast(node, 'not-prose overflow-x-auto'); } }] }) then highlightedCode} {@html highlightedCode} {/await} diff --git a/website/src/routes/+layout.svelte b/website/src/routes/+layout.svelte index 13009eb..d58891a 100644 --- a/website/src/routes/+layout.svelte +++ b/website/src/routes/+layout.svelte @@ -74,6 +74,7 @@ > GitHub Repository Policies + Documentation diff --git a/website/src/routes/docs/+page.svelte b/website/src/routes/docs/+page.svelte new file mode 100644 index 0000000..ffba1bb --- /dev/null +++ b/website/src/routes/docs/+page.svelte @@ -0,0 +1,240 @@ + + +
+ Even if you're not making a package, but something else such as a game, you will still need to + initialize package. +
+This will prompt you questions, after which it will create a pesde.yaml file.
++ You can use the `add` command to add dependencies to your project. With the `wally` feature + enabled, you can add Wally dependencies. +
++ If you are making a package, you can use the `--peer` argument to add a package as a peer + dependency. Peer dependencies are not installed when the package is installed, but are + required to be installed by the user of the package. This is useful for things like framework + plugins. +
++ If you want to declare the dependency as server or development only, you can use the `--realm + server` or `--realm development` arguments respectively. The `shared` realm is the default. +
++ Dependency overrides allow you to use a different version of a dependency than the one + specified in the package. This is useful for sharing 1 version of a dependency. +
++ Dependency overrides use the keys in the format of desired names separated with `>`, and + optionally other paths separated with `,`. The value is a dependency specifier. +
+You can use the `remove` command to remove dependencies from your project.
++ You can list outdated dependencies with the `outdated` command. This will list all + dependencies that have a newer version available. +
+The `install` command will install all dependencies of a project.
++ You can use the `--locked` argument to skip resolving and read the dependencies from the + lockfile. If any changes were made from the time the lockfile was generated this will error. +
++ Dependencies may export a bin script. You can run this script with the `run` command. The + script will be executed with Lune. You can use the `--` argument to pass arguments to the + script. +
++ You can use the `patch` command to patch a dependency. This will output a directory in which + you can edit the dependency. After you are done, run the `patch-commit` command with the + directory as an argument to commit the changes. +
++ You can publish a package with the `publish` command. This will upload the package to the + registry. This will publish to the `default` index. +
++ You can search for packages with the `search` command. This will list all packages that match + the query. It will search by name and description. +
++ Here is a cheat sheet for the manifest format. This is the format of the pesde.yaml file. The + `name` and `version` fields are required. All other fields are optional. +
+A description of each type:
++ If the realm field is not specified, it will default to `shared`. If it is another value, and + the package is to be installed in a different realm, pesde will error. +
++ The sourcemap generator command is only used for Wally and Git packages. It will be ran in a + package's directory, and must output a sourcemap file. This is used to generate a sourcemap + for the package so that types may be found and re-exported. +
+