Skip to content
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

feat(docs): update docs #997

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api_versioned_docs/version-latest/02-cli-user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Usage:
$ wing new <template>
```

Run `wing new` without any arguments to view the available templates or you can [view the templates on GitHub](https://github.com/winglang/wing/tree/main/apps/wing/project-templates/wing).
Run `wing new` without any arguments to view the available templates or you can [view the templates on GitHub](https://github.com/winglang/wing/tree/main/packages/winglang/project-templates/wing).

## Run: `wing run|it`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ It will compile, lint, test and package all modules.
When testing your changes to Wing, locally it may be helpful to be able to easily invoke your local version of the Wing CLI.
In which case adding a shell alias may be helpful for instance on Linux and Mac you could add:

`alias mywing=/<PATH_TO_WING_REPO>/apps/wing/bin/wing` to your shell's rc file.
`alias mywing=/<PATH_TO_WING_REPO>/packages/winglang/bin/wing` to your shell's rc file.
:::

The `pnpm wing` command can be executed from the root of the repository in order to build and run the
Expand Down Expand Up @@ -118,13 +118,11 @@ This command runs the full Wing CLI with the given arguments. Turbo will ensure
## How is the repository structured?

The Wing repository is structured as a monorepo, which means that it contains multiple packages.
Packages that are primarily meant to be run by users are in the `apps` directory, while packages
that are primarily meant to be consumed as libraries are in the `libs` directory. Some packages are
written in Rust, while others are written in TypeScript. Each has a README explaining what it does
Most of the packages are inside the `packages` folder. Each has a README explaining what it does
and how to use it. (If you see one missing, please open an issue and let us know!)

The Wing monorepo uses [Turbo] to run commands across all code packages in the `libs` and `apps`
folders. This means it includes packages that form the entire toolchain (compiler, standard library, IDE
The Wing monorepo uses [Turbo] to run commands across all code packages in the `packages`
folder. This means it includes packages that form the entire toolchain (compiler, standard library, IDE
extension, etc), and the build and release bind them all together.

Turbo will be installed alongside the rest of the project's dependencies after you run `pnpm install`
Expand Down Expand Up @@ -196,10 +194,10 @@ turbo test -F @winglang/wingc
The following command runs `wingc` on a file. This performs all the compilation steps. Run from the root.

```sh
pnpm wing -- compile <path to a .w file (full path, or relative to the location of the apps/wing folder)>
pnpm wing -- compile <path to a .w file (full path, or relative to the location of the packages/winglang folder)>
```

You can find the compilation artifacts in the `apps/wing/target` folder.
You can find the compilation artifacts in the `packages/winglang/target` folder.

To check that your code passes all the lints, run:

Expand Down Expand Up @@ -243,8 +241,8 @@ turbo playground -F @winglang/tree-sitter-wing

## 🔨 How do I build the VSCode extension?

The VSCode extension is located in `apps/vscode-wing`. Most of the "logic" is in the language server, which
is located in the Wing CLI at `apps/wing/src/commands/lsp.ts`.
The VSCode extension is located in `packages/vscode-wing`. Most of the "logic" is in the language server, which
is located in the Wing CLI at `packages/winglang/src/commands/lsp.ts`.

To compile the extension (also creates an installable `.vsix` file):

Expand Down Expand Up @@ -283,7 +281,7 @@ Lastly you can show linting errors in your IDE by enabling the following setting

Adding a new template is straightforward!

Each template is represented by a folder located at [project-templates](https://github.com/winglang/wing/tree/main/apps/wing/project-templates), containing all of the files that template should be initialized with.
Each template is represented by a folder located at [project-templates](https://github.com/winglang/wing/tree/main/packages/winglang/project-templates), containing all of the files that template should be initialized with.

Create a new folder with the template name, and insert any code files that are needed to run it.
Unit tests ran with `turbo test` (or in GitHub Actions once you make a pull request) will automatically validate that the template is valid.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Wing has extended support for two IDEs. They provide syntax highlighting, comple
To use Wing in other IDEs, there are a few tools available to help:

- Language server - Running `wing lsp` serves the official language server
- [TextMate grammar](https://github.com/winglang/wing/blob/main/apps/vscode-wing/syntaxes/wing.tmLanguage.json) - For syntax highlighting
- [tree-sitter grammar and queries](https://github.com/winglang/wing/tree/main/libs/tree-sitter-wing) - For syntax highlighting and more
- [TextMate grammar](https://github.com/winglang/wing/blob/main/packages/vscode-wing/syntaxes/wing.tmLanguage.json) - For syntax highlighting
- [tree-sitter grammar and queries](https://github.com/winglang/wing/tree/main/packages/@winglang/tree-sitter-wing) - For syntax highlighting and more
- [Syntax Highlighting for GitHub (Chrome extension)](https://chromewebstore.google.com/detail/winglang-syntax-hightligh/gjnleleianfjpmckmmdeahlklhcdlakj) - Adds syntax highlighting to various locations within GitHub

## Create your project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords: [faq, console, winglang, Wing programming language, Wing language, ope
Unlike the rest of the wing repo, which is open-source under the MIT license, the console is source-available.
It means that you can see the source code, report bugs in it and contribute modifications, but you can't use it for commercial purposes.

You can see the full details of the license [here](https://github.com/winglang/wing/blob/main/apps/wing-console/LICENSE.md).
You can see the full details of the license [here](https://github.com/winglang/wing/blob/main/wing-console/LICENSE.md).

The license for the rest of the repo is [MIT](https://github.com/winglang/wing/blob/main/LICENSE.md).