Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM.
The Open Source Guides website has a collection of resources for individuals, communities, and companies. These resources help people who want to learn how to run and contribute to open source projects. Contributors and people new to open source alike will find the following guides especially useful:
There are many ways to contribute to Svelte, and many of them do not involve writing any code. Here's a few ideas to get started:
Contributions are very welcome. If you think you need help planning your contribution, please ping us on Discord at svelte.dev/chat and let us know you are looking for a bit of help.
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in.
We use GitHub issues for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you are certain this is a new unreported bug, you can submit a bug report.
If you have questions about using Svelte, contact us on Discord at svelte.dev/chat, and we will do our best to answer your questions.
If you see anything you'd like to be implemented, create a feature request issue
When opening a new issue, always make sure to fill out the issue template. This step is very important! Not doing so may result in your issue not being managed in a timely fashion. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
If you'd like to propose an implementation for a large new feature or change then please create an RFC to discuss it up front.
npm install
in the root of the repository.npm run dev
.So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
Working on your first Pull Request? You can learn how from this free video series:
How to Contribute to an Open Source Project on GitHub
If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with feature template.
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend that you file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Please make sure the following is done when submitting a pull request:
master
.npm run lint
).npm run test
).All pull requests should be opened against the master
branch.
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI.
All tests are located in /test
folder.
Test samples are kept in /test/xxx/samples
folder.
npm run test
.-g
(aka --grep
) option. For example, to only run test involving transitions, run npm run test -- -g transition
..solo
. For example, to run the test/js/samples/action
only, rename it to test/js/samples/action.solo
..solo
. For example, to run the test/js
test suite only, rename it to test/js.solo
..expected
filescss
, js
, server-side-rendering
asserts that the generated output has to match the content in the .expected
file. For example, in the js
test suites, the generated js code is compared against the content in expected.js
..expected
file, run the test with --update
flag. (npm run test --update
)When adding a new breaking change, follow this template in your pull request:
### New breaking change here
- **Who does this affect**:
- **How to migrate**:
- **Why make this breaking change**:
- **Severity (number of people affected x effort)**:
The core Svelte team will be monitoring for pull requests. Do help us by making your pull request easy to review by following the guidelines above.
Eslint will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running npm run lint
.
snake_case
for internal variable names and methods.camelCase
for public variable names and methods.By contributing to Svelte, you agree that your contributions will be licensed under its MIT license.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。