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. Go to our repo and press the Fork button in the top right.
  3. Click the Code button in Github to clone down a copy of your fork to your local machine
  4. Run cd skeleton to move into the cloned monorepo project.
  5. Delete your node_modules directory, then run pnpm i to install dependencies for all projects.
  6. Run cd sites/skeleton.dev to move into the Skeleton documentation project.
  7. Run code . to open the current project directory in VS Code.
  8. Run pnpm dev to start a local dev server. You may see a warning the first time.
  9. Open the dev server address provided by the terminal in your browser.
  10. 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';

Changesets

Once you have a PR that is ready, it'll be time to add a Changeset. We use changesets to help automate our versioning, changelogs, and releases.

We will be creating changesets using the Changeset CLI. The CLI will walk us through the process by having us select the packages and their respective version bumps. Version bumps are how we increment the versions for our packages and they come in 3 flavors: major, minor, and patch.

Generally, new features are minor bumps while bugfixes and chores are patch bumps. When writing the summary for the changeset, be sure to prefix the message with either feat:, bugfix:, or chore:.

PrefixWhen to useVersion Bump
feat: For when a new feature is added minor
bugfix: For bug fixes patch
chore: For dependency and general project management patch

Adding a Changeset

  1. Navigate to the root directory of the monorepo.
  2. Run pnpm changeset to run the Changeset CLI.
  3. Press Space to select the package(s) you would like to add a changeset for. Once selected, press Enter.
  4. Now it's time to select a version bump. If it's the version bump you desire, press Space to select the package(s) that it will apply to, and press Enter to submit. Otherwise, press Enter to move on to the next version bump option.
  5. You will now be prompted to write a summary. Prefix your summary with either feat:, bugfix:, or chore:. Then briefly describe the change you implemented.
  6. Confirm the changes and commit the newly generated markdown file.

Tooling

Skeleton utilizes a number of additional tools for project maintenance.

Code Linting & Formatting

To check for linting issues via Prettier, run:

terminal
pnpm lint

To automatically apply suggested linting changes, run:

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

terminal
pnpm test

Spell Checking

Skeleton uses Cspell to check for spelling errors. We recommend 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.

terminal
pnpm cspell "**" --no-progress

Dependencies

Introducing new dependencies to projects is strictly prohibited. Please sync with a core maintainer if this is required. Pull requests that introduce new dependencies without approval will be rejected.