Skip to content

Latest commit

 

History

History
107 lines (68 loc) · 3.94 KB

CONTRIBUTING.md

File metadata and controls

107 lines (68 loc) · 3.94 KB

Contributing Guide

General Guidelines

Thanks for understanding that English is used as a shared language in this repository. Maintainers do not use machine translation to avoid miscommunication due to error in translation. If description of issue / PR are written in non-English languages, those may be closed.

It is of course fine to use non-English language, when you open a PR to translate documents and communicates with other users in same language.

Pull Request Guidelines

  • The main branch is the latest stable version release. All development should be done in dedicated branches.

  • Checkout a topic branch from the relevant branch, e.g. main, and merge back against that branch.

  • Work in the src folder and DO NOT checkin dist in the commits.

  • If adding new feature:

    • Add accompanying test case.
    • Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
  • If fixing a bug:

    • Provide detailed description of the bug in the PR. Live demo preferred.
    • Add appropriate test coverage if applicable.
  • It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.

  • Make sure pnpm test passes. (see development setup)

Work Step Example

  • Fork the repository from intlify/routing !
  • Create your topic branch from main: git branch my-new-topic origin/main
  • Add codes and pass tests !
  • Commit your changes: git commit -am 'Add some topic'
  • Push to the branch: git push origin my-new-topic
  • Submit a pull request to main branch of intlify/routing repository !

Development Setup

You will need Node.js version 14.16+, and PNPM.

After cloning the repo, run:

$ pnpm i # install the dependencies of the project

A high level overview of tools used:

Scripts

pnpm build

The build script builds all public packages (currently packages/vue-i18n-routing only) via scripts/build.ts.

pnpm test

The test script calls the following npm scripts:

  • typecheck: type check in vue-i18n-routing (currently)
  • test:unit: test in vue-i18n-routing (currently)
  • test:unit:vue2: test in vue-i18n-routing (currently) for Vue 2

Project Structure

This repository employs a monorepo setup which hosts a number of associated packages under the packages directory:

  • vue-i18n-routing: The i18n routing with using vue-i18n

Contributing Tests

Unit tests are collocated with directories named __test__. Consult the Vitest docs and existing test cases for how to write new test specs.

Financial Contribution

As a pure community-driven project without major corporate backing, we also welcome financial contributions via GitHub Sponsors

Funds donated via GitHub Sponsors and Patreon go to support kazuya kawaguchi full-time work on Intlify.

Credits

Thank you to all the people who have already contributed to Intlify project and my OSS work !