Skip to content

Commit

Permalink
doc: updated contributing rules
Browse files Browse the repository at this point in the history
  • Loading branch information
manchenkoff committed Mar 31, 2024
1 parent 9d80686 commit 35d7d64
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 39 deletions.
85 changes: 79 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,96 @@
# How to contribute

TODO: Introductionary part about expectations from the contributor
Please follow the guidelines below if you want to contribute to the project.

If you are working on a new feature, please create an issue on GitHub first. This will help us to understand what you are working on and to avoid duplication of work.

# Development environment

TODO: how to clone and setup the repo
You can clone the repo by running the following command:

```bash
git clone [email protected]:manchenkoff/nuxt-auth-sanctum.git
```

Then you should create a new branch with the following name convention:

```bash
git checkout -b XXX-feature-name
```

Where `XXX` is the issue number on the GitHub.

## Install dependencies

To setup the development environment, you should install the dependencies first. You can do this by running the following command:

```bash
yarn install
```

Then you can start dev server to see the playground app:

```bash
yarn dev
```

Or if you want to build the project, you can run one of the following commands:

```bash
# Generate type stubs
yarn dev:prepare

# Build the playground
yarn dev:build
```

# Testing process

TODO: how to test playground app with Laravel API
To test playground app you need to have a Laravel API running with Sanctum package installed.

if there are tests for the feature you are working on, you can run them by executing one of the following commands:

```bash
# Run Vitest
yarn test

# Run Vitest in watch mode
yarn test:watch
```

# Code Style and Standards

TODO: about prettier, eslint and tsc
This project uses ESLint and Prettier to enforce code style and standards. Please make sure to run the following commands before creating a pull request:

```bash
# Run Prettier
yarn fmt

# Run ESLint
yarn lint

# Run Nuxt type check
yarn types
```

To fix the issues automatically, you can run the following command:

```bash
yarn fix:fmt
```

# Releasing

Once all the changes are merged into main branch, run the following command to release a new version:

```bash
yarn release
```

# Code of Conduct

TODO: link to the document
All contributors are expected to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md). Please read it.

# Get in touch

TODO: contacts to reach out in case of questions, or link to open an issue
If you have any questions or need help, feel free to reach out via [email protected] or by opening a new issue on Github.
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ This module provides a simple way to use Laravel Sanctum with Nuxt by leveraging
- [Documentation](https://manchenkoff.gitbook.io/nuxt-auth-sanctum/)
- [Features](#features)
- [Quick Setup](#quick-setup)
- [Development](#development)

## Features

Expand Down Expand Up @@ -59,38 +58,6 @@ That's it! You can now use Nuxt Auth Sanctum in your Nuxt app ✨

For more details, check the documentation [here](https://manchenkoff.gitbook.io/nuxt-auth-sanctum/).

## Development

```bash
# Install dependencies
yarn install

# Generate type stubs
yarn dev:prepare

# Develop with the playground
yarn dev

# Build the playground
yarn dev:build

# Run Prettier
yarn fmt

# Run ESLint
yarn lint

# Run Nuxt type check
yarn types

# Run Vitest
yarn test
yarn test:watch

# Release new version
yarn release
```

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/nuxt-auth-sanctum/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
Expand Down

0 comments on commit 35d7d64

Please sign in to comment.