-
-
Notifications
You must be signed in to change notification settings - Fork 69
docs: contributing.md #549
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 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
954d3d6
init
brettearle 835ba99
skeleton and sveltekit reference
brettearle 31cb952
workflow and preparing
brettearle 8d7f3c4
1st draft
brettearle 77a9936
Update CONTRIBUTING.md
brettearle d77ad71
docs: update based on feedback
brettearle 5130a72
docs: changelog added
brettearle 1268309
docs: added change set directions for sv and svelte-migrate only
brettearle 7ece3eb
docs: removed cd to packages in specific tests
brettearle 86eee66
docs: reworded project test explanation
brettearle 7ca22c2
docs: Integration testing explanation
brettearle e44bc83
docs: updated headings for readability and grammar
brettearle 6e8b154
docs: second round fixes
brettearle 79e7aa6
docs: added debug test starting point
brettearle ca248ea
docs: added debug test starting point - edited
brettearle f042bbe
docs: added running individual tests
brettearle 1b260ef
docs: added running individual tests - edited
brettearle 091b788
update: redundant example removed. Removed specified js
brettearle 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,89 @@ | ||
| # SV Contributing Guide | ||
|
|
||
| ## Workflow | ||
|
|
||
| We follow the standard fork-based workflow: | ||
|
|
||
| 1. **Fork** this repository to your GitHub account. | ||
| 2. **Clone** your fork locally. | ||
| 3. **Create a new branch** for your change: | ||
| `git checkout -b your-feature-name` | ||
| 4. **Commit and push** your changes to your branch. | ||
| 5. **Open a pull request** from your branch to the `main` branch of this repository. | ||
|
|
||
| Please keep your pull requests focused to feature or issue. Focused smaller changes are easier to review and faster to merge. | ||
|
|
||
| ## Preparing | ||
| This is a monorepo, meaning the repo holds multiple packages. It requires the use of [pnpm](https://pnpm.io/). You can [install pnpm](https://pnpm.io/installation) with: | ||
|
|
||
| ```bash | ||
| npm i -g pnpm | ||
| ``` | ||
|
|
||
| For running certain packages and tests locally you will need to install [docker](https://docs.docker.com/get-started/get-docker). | ||
| Linux users, you will have to ensure 'sudo' is not required. See [docker post install](https://docs.docker.com/engine/install/linux-postinstall/) | ||
|
|
||
| `pnpm` commands run in the project's root directory will run on all sub-projects. You can checkout the code and install the dependencies with: | ||
|
|
||
| ```bash | ||
| git clone [email protected]:YOUR_GITHUB_USER_HERE/cli.git | ||
| cd cli | ||
| pnpm install | ||
| ``` | ||
|
|
||
| ## build/run | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Build the project from root run 'build' script: | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| #from root of project | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pnpm build | ||
| ``` | ||
| This outputs into /packages/PACKAGE/dist/. | ||
|
|
||
| Run the 'cli' package: | ||
| ```bash | ||
| node ./packages/cli/dist/bin.js | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## testing | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Run all tests: | ||
| ```bash | ||
| #from root of project | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pnpm test | ||
| ``` | ||
|
|
||
| Run package specific tests by navigating to the package and running the test command. Eg: | ||
| ```bash | ||
| cd packages/core/ | ||
| pnpm test | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
brettearle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - DIRECTION REQUIRED: how to write tests. | ||
|
|
||
| ## styleguide | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Coding style | ||
|
|
||
| There are a few guidelines we follow: | ||
|
|
||
| - Internal variables are written with `snake_case` while external APIs are written with `camelCase` | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - Ensure `pnpm lint` and `pnpm check` pass. You can run `pnpm format` to format the code | ||
| - linting | ||
| ```bash | ||
| #from root of project | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pnpm lint | ||
| ``` | ||
| - formatting | ||
| ```bash | ||
| # from root of project | ||
| pnpm format | ||
| ``` | ||
| - checking | ||
brettearle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ```bash | ||
| # from root of project | ||
| pnpm check | ||
| ``` | ||
|
|
||
| ## svelte-migrate | ||
| - TODO: check issue #494 for further details on what is needed for svelte-migrate | ||
|
|
||
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.