Skip to content

Commit

Permalink
docs: update various cleanup docs files
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn committed Dec 20, 2024
1 parent 645d3f6 commit d470bae
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 233 deletions.
13 changes: 13 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
196 changes: 35 additions & 161 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,195 +1,69 @@
# Contributing

## Questions
We are open to, and grateful for, any contributions made by the community. By contributing to Vue Redux, you agree to abide by the [code of conduct](https://github.com/reduxjs/vue-redux/blob/main/CODE_OF_CONDUCT.md).

If you have questions about implementation details, help or support, then please use our dedicated community forum at [GitHub Discussions](https://github.com/TanStack/form/discussions) **PLEASE NOTE:** If you choose to instead open an issue for your question, your issue will be immediately closed and redirected to the forum.
Please review the [Redux Style Guide](https://redux.js.org/style-guide/style-guide) in the Redux docs to keep track of our best practices.

## Reporting Issues
## Reporting Issues and Asking Questions

If you have found what you think is a bug, please [file an issue](https://github.com/TanStack/form/issues/new/choose). **PLEASE NOTE:** Issues that are identified as implementation questions or non-issues will be immediately closed and redirected to [GitHub Discussions](https://github.com/TanStack/form/discussions)
Before opening an issue, please search the [issue tracker](https://github.com/reduxjs/vue-redux/issues) to make sure your issue hasn't already been reported.

## Suggesting new features

If you are here to suggest a feature, first create an issue if it does not already exist. From there, we will discuss use-cases for the feature and then finally discuss how it could be implemented.
Please ask any general and implementation specific questions on [Stack Overflow with a Redux tag](http://stackoverflow.com/questions/tagged/redux?sort=votes&pageSize=50) for support.

## Development

If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started:

- Fork this repository.
- Install dependencies by running `$ pnpm install`.
- We use [pnpm](https://pnpm.io/) v7 for package management.
- We use [nvm](https://github.com/nvm-sh/nvm) to manage node versions - please make sure to use the version mentioned in `.nvmrc`.
- Run development server using `pnpm run watch`.
- Implement your changes and tests to files in the `src/` directory and corresponding test files.
- Document your changes in the appropriate doc page.
- Git stage your required changes and commit (see below commit guidelines).
- Submit PR for review.

### Editing the docs locally and previewing the changes

The documentations for all the TanStack projects are hosted on [tanstack.com](https://tanstack.com), which is a Remix application (https://github.com/TanStack/tanstack.com). You need to run this app locally to preview your changes in the `TanStack/form` docs.

> [!NOTE]
> The Remix app fetches the doc pages from GitHub in production, and searches for them at `../form/docs` in development. Your local clone of `TanStack/form` needs to be in the same directory as the local clone of `TansStack/tanstack.com`.
You can follow these steps to set up the docs for local development:
Visit the [Issue tracker](https://github.com/reduxjs/vue-redux/issues) to find a list of open issues that need attention.

1. Make a new directory called `tanstack`.
Fork, then clone the repo:

```sh
mkdir tanstack
```

2. Enter that directory and clone the [`TanStack/form`](https://github.com/TanStack/form) and [`TanStack/tanstack.com`](https://github.com/TanStack/tanstack.com) repos.

```sh
cd tanstack
git clone [email protected]:TanStack/form.git
# We probably don't need all the branches and commit history
# from the `tanstack.com` repo, so let's just create a shallow
# clone of the latest version of the `main` branch.
# Read more about shallow clones here:
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/#user-content-shallow-clones
git clone [email protected]:TanStack/tanstack.com.git --depth=1 --single-branch --branch=main
git clone https://github.com/your-username/vue-redux.git
```

> [!NOTE]
> Your `tanstack` directory should look like this:
>
> ```
> tanstack/
> |
> +-- form/ (<-- this directory cannot be called anything else!)
> |
> +-- tanstack.com/
> ```
3. Enter the `tanstack/tanstack.com` directory, install the dependencies and run the app in dev mode:
```sh
cd tanstack.com
This repository uses PNPM 9 to manage packages. Install dependencies with:

```
pnpm i
# The app will run on https://localhost:3000 by default
pnpm dev
```

4. Now you can visit http://localhost:3000/form/latest/docs/overview in the browser and see the changes you make in `tanstack/form/docs` there.

> [!WARNING]
> You will need to update the `docs/config.json` file (in `TanStack/form`) if you add a new documentation page!
You can see the whole process in the screen capture below:

https://github.com/fulopkovacs/form/assets/43729152/9d35a3c3-8153-4e74-9cb2-af275f7a269b

### Running examples

- Make sure you've installed the dependencies by running `$ pnpm install` in the repo's root directory.
- If you want to run the example against your local changes, run `pnpm run watch` in the repo's root directory. Otherwise, it will be run against the latest TanStack Form release.
- Run `pnpm run dev` in the selected examples' directory.

#### Note on `examples/react-native`

React Native example requires Expo to work. Please follow the instructions from example's README.md file to learn more.

#### Note on standalone execution

If you want to run an example without installing dependencies for the whole repo, just follow instructions from the example's README.md file. It will be then run against the latest TanStack Form release.

## Online one-click setup

You can use Gitpod (An Online Open Source VS Code like IDE which is free for Open Source) for developing online. With a single click it will start a workspace and automatically:

- clone the `TanStack/form` repo.
- install all the dependencies in `/` and `/docs`.
- run `npm start` in the root(`/`) to Auto-build files.
- run `npm run dev` in `/docs`.
### Building

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/TanStack/form)

## Commit message conventions

`TanStack/form` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).

We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**.

### Commit Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:
Running the `build` task will create an ESM build.

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
pnpm build
```

The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.

### Type

Must be one of the following:

- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation

### Scope
### Testing and Linting

The scope could be anything specifying place of the commit change. For example `useForm`, `useMutation` etc...
To run the tests:

You can use `*` when the change affects more than a single scope.

### Subject

The subject contains succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end

### Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

### Footer

The footer should contain any information about **Breaking Changes** and is also the place to [reference GitHub issues that this commit closes](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue).

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
```
pnpm test
```

### Example
### New Features

Here is an example of the release type that will be done based on a commit messages:
Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.

| Commit message | Release type |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
## Submitting Changes

### Revert
- Open a new issue in the [Issue tracker](https://github.com/reduxjs/vue-redux/issues).
- Fork the repo.
- Create a new feature branch based off the `main` branch.
- Make sure all tests pass and there are no linting errors.
- Submit a pull request, referencing any issues it addresses.

If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
Please try to keep your pull request focused in scope and avoid including unrelated commits.

## Pull requests
After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.

Maintainers merge pull requests by squashing all commits and editing the commit message if necessary using the GitHub user interface.
Thank you for contributing!

Use an appropriate commit type. Be especially careful with breaking changes.
# Cutting a release

## Releases
If you are a maintainer and want to cut a release, follow these steps:

For each new commit added to `main` with `git push` or by merging a pull request or merging from another branch, a GitHub action is triggered and runs the `semantic-release` command to make a release if there are codebase changes since the last release that affect the package functionalities.
- `yarn build:all`
- `cd packages && cd vue-redux`
- `npm publish`
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2024-present Corbin Crutchley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 0 additions & 6 deletions codecov.yml

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"prettier": "prettier --ignore-unknown .",
"prettier:write": "pnpm run prettier --write",
"docs:generate": "node scripts/generateDocs.js",
"cipublish": "node scripts/publish.js",
"cipublishforce": "CI=true pnpm cipublish",
"start:docs": "pnpm --filter website run start",
"build:docs": "pnpm --filter website run build"
},
Expand Down
39 changes: 8 additions & 31 deletions packages/vue-redux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Performant and flexible.

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/reduxjs/vue-redux/test.yml?style=flat-square) [![npm version](https://img.shields.io/npm/v/@reduxjs/vue-redux.svg?style=flat-square)](https://www.npmjs.com/package/@reduxjs/vue-redux)
[![npm downloads](https://img.shields.io/npm/dm/@reduxjs/vue.svg?style=flat-square)](https://www.npmjs.com/package/@reduxjs/vue-redux)

> [!WARNING]
> This package is in alpha and is rapidly developing.
[![#redux channel on Discord](https://img.shields.io/badge/[email protected]?style=flat-square)](http://www.reactiflux.com)

## Installation

Expand All @@ -30,31 +28,10 @@ with a module bundler like [Webpack](https://webpack.js.org/) or
[Browserify](http://browserify.org/) to consume [CommonJS
modules](https://webpack.js.org/api/module-methods/#commonjs).

# Usage

The following Vue component works as-expected:

```vue
<script setup lang="ts">
import { useSelector, useDispatch } from '@reduxjs/vue-redux'
import { decrement, increment } from './store/counter-slice'
import { RootState } from './store'
const count = useSelector((state: RootState) => state.counter.value)
const dispatch = useDispatch()
</script>
<template>
<div>
<div>
<button aria-label="Increment value" @click="dispatch(increment())">
Increment
</button>
<span>{{ count }}</span>
<button aria-label="Decrement value" @click="dispatch(decrement())">
Decrement
</button>
</div>
</div>
</template>
```
## Documentation

The Vue Redux docs are published at **https://vue-redux.js.org** .

## License

[MIT](LICENSE.md)
33 changes: 0 additions & 33 deletions scripts/publish.js

This file was deleted.

0 comments on commit d470bae

Please sign in to comment.