Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.99 KB

File metadata and controls

57 lines (38 loc) · 1.99 KB

@intlify/bundle-tools Contributing Guide

Hi! We are really excited that you are interested in contributing to @intlify/bundle-tools. Before submitting your contribution, please make sure to take a moment and read through the following guide:

Work Step Example

  • Fork the repository from @intlify/bundle-tools !
  • 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/bundle-tools repository !

Development Setup

You will need Node.js version 18+, and PNPM v10.

After cloning the repo, run:

$ yarn # install the dependencies of the project

A high level overview of tools used:

  • TypeScript as the development language
  • Vite for bundling at @intlify/vite-plugin-vue-i18n
  • Webpack for bundling at @intlify/vue-i18n-loader
  • Vitest for unit testing and e2e testing
  • Playwright for e2e testing
  • ESLint for code linting
  • Prettier for code formatting

Scripts

pnpm build

The build script builds transpile to ES Modules and CommonJS file with unbuild.

pnpm test

The pnpm test script simply calls the vitest binary, so all Vitest CLI Options can be used. Some examples:

# run all tests
$ pnpm test

# run unit tests
$ pnpm test:unit

# run e2e tests
$ pnpm test:e2e

Contributing Tests

Unit tests are collocated with directories named test at each package. Consult the Vitest docs and existing test cases for how to write new test specs. Here are some additional guidelines: