Skip to content

Latest commit

 

History

History
92 lines (55 loc) · 4 KB

CONTRIBUTING.md

File metadata and controls

92 lines (55 loc) · 4 KB

Contribution guide

Hi! Thanks for your interest in contributing to the project. Before contributing, make sure you read the contribution guide: it will help you get started with the repo, the tools used and the project workflow.

🔨 Repository setup

This repo uses pnpm as package manager and is also compatible with Volta as Node version manager. It is also recommended you have Corepack enabled.

To set the repository up:

Step Command
1. Install Node.js, using the current or latest LTS -
2. Enable Corepack corepack enable
3. Install pnpm npm i -g pnpm
4. Install dependencies under the project root pnpm install

Packages

The code is a monorepo where packages are located under packages/ folder. You will find the base plugin and a nuxt module. Monorepo is managed through pnpm. Each package is released independently.

Docs

Documentation lives under the docs/ folder and is powered by vitepress.

⚡️ Commands

pnpm run build

Builds the project for production into dist/ using tsup.

pnpm run test

Runs tests using Vitest.

There are also subcommands available:

  • pnpm run test:watch: starts test in watch mode and reruns tests on code change.
  • pnpm run test:ui: similar to watch-mode but with a beautiful UI.

pnpm run lint

Runs ESLint (and Prettier as a plugin). To resolve auto-fixable issues, run pnpm run lint:fix.

pnpm run coverage

Generates code coverage based on a Vue3-specific tests run using into coverage/.

🙌 Submitting a pull request

Discuss first

Before you start to work on a feature pull request, it's always better to open a feature request issue first to discuss whether the feature is desired/needed and how it could/should be implemented. This would help save time for both the maintainers and the contributors and help features to be shipped faster.

Commit convention

This repo uses Gitmoji because who doesn't appreciate some colors ? ☺️

It remains simple and straightforward:

git commit -m '<intention> <message>'
  • intention: an emoji from this list corresponding to the change.
  • message: a brief description of the change.

The pull request

If it is your first time or you need help creating a PR, you can read the GitHub guide.

When submitting a pull request, make sure your PR's title also follows the commit convention.

If your PR fixes or resolves an existing issue, please link it in your PR description (replace 123 with a real issue number):

fixes #123

Commits in the PR don't matter as they are squashed and merged into a single commit.

Code quality and testing

To maintain this project's quality, make sure the build, test run successfully on your machine before submitting the PR.

When adding new features and introducing new source code into the core of the plugin, try to add related test cases. If you need help implementing them, you can specify it in the description and we will gladly help you doing so! Helpers such as the /nuxt don't need to be tested as they are just pre-configured plugins and rely on external tools/frameworks.


Thanks for reading the guide and happy contributing!