Skip to content

Commit

Permalink
docs: add docs to help contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
justintaddei authored and justintaddei committed Jun 27, 2024
1 parent 2d1d502 commit 882684c
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.0"
}
}
62 changes: 62 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Contributing to v-wave

Thank you for your interest contributing to v-wave! As this project is maintained by just one person, your help is greatly appreciated.

## Table of contents

- [Contributing to v-wave](#contributing-to-v-wave)
- [Table of contents](#table-of-contents)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Development](#development)
- [Testing](#testing)
- [Linting and formatting](#linting-and-formatting)
- [Building](#building)
- [Raising a pull request](#raising-a-pull-request)

## Prerequisites

This project uses pnpm for package management. Installation instructions can be found [here](https://pnpm.io/installation).

## Setup

Run `pnpm install` to install dependencies and set up git commit hooks.

**If you're using VSCode, I recommend installing the following extensions:**

- [biome](https://marketplace.visualstudio.com/items?itemName=biomejs.biome) (for displaying linting/formatting errors)
- [vitest](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) (for displaying vitest test results in the editor)


## Development

### Testing

This project uses [vitest](https://vitest.dev/) for testing.
> If you're familiar with Jest, you should be able to write most tests using your existing knowledge, substituting `jest.*` functions for `vi.*`.
Run `pnpm test` or `pnpm test:watch` to run the test suite.
Run `pnpm test:coverage` to run the test suite and generate a coverage report.

When writing tests, place them in the same directory as the file they are testing.
Test files should follow this naming convention: `<name of source file>.test.ts`.

### Linting and formatting

Run `pnpm lint` to lint and format the project.
Run `pnpm lint:no-write` to lint the project without writing any changes.

### Building

Run `pnpm build` to build the project for production.
Run `pnpm dev` to build the project and watch for changes.


## Raising a pull request

When you're ready to raise a pull request, please follow these steps:

1. Ensure that commits follow [Conventional Commits](https://www.conventionalcommits.org/) and meaningful describe your changes. Your commit messages will be used to generate the changelog automatically.
2. When you commit your changes, hooks will run automatically to ensure your code follows the project's conventions. Please do not commit using `git commit --no-verify`. If you do, the CI will fail for PR and you'll need to fix any linting errors before it can be merged.
> **Note:** if the CI fails because your commit message didn't comply with [Conventional Commits](https://www.conventionalcommits.org/), you will need to modify your commit message using `git commit --amend` or `git rebase -i`.
3. Please try to provide as much context as possible in the PR description as it will help me to review your changes more quickly.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ After installing and registering the plugin, this is all you need to get started
- [Local registration with Composition API:](#local-registration-with-composition-api)
- [Local registration with Options API:](#local-registration-with-options-api)
- [Changing the directive's name](#changing-the-directives-name)
- [Contributing](#contributing)
- [License](#license)

## Installation
Expand Down Expand Up @@ -658,6 +659,10 @@ Now you can use the plugin like so:

> Keep in mind that this option can only be set globally (i.e. it cannot be set on individual directives).
## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/justintaddei/v-wave/blob/master/CONTRIBUTING.md) for more details.

## License

This project is distributed under the [MIT License](https://github.com/justintaddei/v-wave/blob/master/LICENSE.md).
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"lineEnding": "lf",
"lineEnding": "crlf",
"lineWidth": 120
},
"organizeImports": { "enabled": true },
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
"files": ["dist/**/*", "nuxt/**/*"],
"scripts": {
"build": "tsup src/index.ts --clean --dts --format esm,cjs,iife --global-name VWave",
"dev": "tsup src/index.ts --watch --dts --format esm,cjs,iife --global-name VWave",
"lint": "biome check --write && tsc",
"lint:no-write": "biome check && tsc",
"test": "vitest run --run",
"test:watch": "vitest --coverage",
"test:watch": "vitest",
"test:coverage": "vitest run --run --coverage",
"prepare": "husky"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
}
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export default defineConfig({
coverage: {
reporter: ['text', 'html'],
},
include: ['src/**/*.test.ts'],
},
})

0 comments on commit 882684c

Please sign in to comment.