Requirements
Please ensure you have read and understand all requirements below. Failure to adhere to the following guidelines may result in your pull requests being denied. We reserve the right to ban repeat offenders.
Pull Requests
- Find an open issue or identify a roadmap task you wish to contribute to.
- If an issue exists on GitHub, leave a comment and let us know you're interested. We'll assign you to it.
- To propose a new feature or update, create a GitHub issue or reach out on Discord in the
#contributors
channel. - Please communicate with maintainers to define all requirements before you write your first line of code.
- Follow our recommended branch naming convention defined in our style guide.
- Submit your pull request as a DRAFT as early as possible. Peer review is critical to this process.
- Run automated tests with
pnpm test
to verify that no regressions were introduced. - Be sure to follow our recommended documentation guidelines before requesting a review.
- When ready, set your pull request to the "ready to review" state. Then be patient. We'll review asap.
- If your PR meets all requirements it will be merged, otherwise feedback and guidance will be provided.
Branches
Branch | Description | Pull Requests |
---|---|---|
master
|
Represents the production branch. All pull requests submitted to this branch will be rejected. | 🚫 NEVER |
dev
|
The active development branch containing bleeding edge changes. Target this branch for PRs | ✅ Yes |
Monorepo
Skeleton uses a monorepo to group related projects into a single repository. This allows us to easily maintain multiple projects and packages in parallel. This includes the Skeleton core library, this documentation site, and more.
In order to contribute to Skeleton, you will be required to install and use pnpm, as it fully supports monorepo project structures. Don't worry, it's very similar to npm
and will handle most of the heavy lifting.
We've provide a quick reference below for where each project is located.
Path | Description |
---|---|
/packages/skeleton
|
The core library project, containing all components, elements, utilities, and more. |
/sites/skeleton.dev
|
The SvelteKit project containing this documentation website. |
Getting Started
If you're not familiar with using a monorepo, please follow the steps below:
- Install pnpm globally using
npm install -g pnpm
. Confirm viapnpm --version
in your terminal. - Run
git clone https://github.com/skeletonlabs/skeleton.git
to clone the monorepo project. - Run
cd skeleton
to move into the cloned monorepo project. - Run
pnpm i
to install depedencies for all projects. - Run
cd sites/skeleton.dev
to move into the Skeleton documentation project. - Run
code .
to open the current project directory in VS Code. - Run
pnpm dev
to start a local dev server. You may see a warning the first time. - Open the dev server address provided by the terminal in your browser.
- Modify the documentation or library components as desired. This fully supports HMR.
Adding New Projects
If you wish to add a new project, first run pnpm getall
from the root of the monorepo. This will clone create-skeleton-app into your project under packages/create-skeleton-app
. Next run pnpm csa yoursitename
. This will generate a brand new Skeleton project in the /sites
directory.
Importing Skeleton
To import Skeleton features (ex: components) within each monorepo project, use the following structure:
import { Avatar } from '@skeletonlabs/skeleton';
Tooling
Skeleton utilizes a number of additional tools for project maintenance.
Code Linting & Formatting
To check for linting issues via Prettier, run:
pnpm lint
To automatically apply suggested linting changes, run:
pnpm format
Automated Tests
Tests are handled via Vitest, which is similar to Jest. Make sure to run all tests before submitting new pull requests.
pnpm test
Spell Checking
Skeleton uses Cspell to check for spelling errors. We
reccomend installing the
Code Spell Checker
extension for VS Code. You can add words to the dictionary using this extension, or by editing cspell.json
at
the root of the repository.
pnpm cspell "**" --no-progress
Dependencies
Introducing new dependencies to projects is strictly prohibited. Please sync with a core core maintainer if this is required. Pull requests that introduce new dependencies without approval will be rejected.