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

  1. Find an open issue or identify a roadmap task you wish to contribute to.
  2. If an issue exists on GitHub, leave a comment and let us know you're interested. We'll assign you to it.
  3. To propose a new feature or update, create a GitHub issue or reach out on Discord in the #contributors channel.
  4. Please communicate with maintainers to define all requirements before you write your first line of code.
  5. Follow our recommended branch naming convention defined in our style guide.
  6. Submit your pull request as a DRAFT as early as possible. Peer review is critical to this process.
  7. Run automated tests with pnpm test to verify that no regressions were introduced.
  8. Be sure to follow our recommended documentation guidelines before requesting a review.
  9. When ready, set your pull request to the "ready to review" state. Then be patient. We'll review asap.
  10. If your PR meets all requirements it will be merged, otherwise feedback and guidance will be provided.

Branches

BranchDescriptionPull 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.

PathDescription
/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:

  1. Install pnpm globally using npm install -g pnpm. Confirm via pnpm --version in your terminal.
  2. Run git clone https://github.com/skeletonlabs/skeleton.git to clone the monorepo project.
  3. Run cd skeleton to move into the cloned monorepo project.
  4. Run pnpm i to install depedencies for all projects.
  5. Run cd sites/skeleton.dev to move into the Skeleton documentation project.
  6. Run code . to open the current project directory in VS Code.
  7. Run pnpm dev to start a local dev server. You may see a warning the first time.
  8. Open the dev server address provided by the terminal in your browser.
  9. 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:

typescript
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:

console
pnpm lint

To automatically apply suggested linting changes, run:

console
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.

console
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.

console
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.