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:
- 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 !
You will need Node.js version 12+, and Yarn v1.
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
- Rollup for bundling at
@intlify/rollup-plugin-vue-i18n
- Jest for unit testing and e2e testing
- Puppeteer for e2e testing
- ESLint for code linting
- Prettier for code formatting
The build
script builds transpile to CommonJS module file.
The yarn test
script simply calls the jest
binary, so all Jest CLI Options can be used. Some examples:
# run all tests
$ yarn test
# run unit tests
$ yarn test:unit
# run unit test coverages
$ yarn test:cover
# run unit tests in watch mode
$ yarn test:watch
# run e2e tests
$ yarn test:e2e
Unit tests are collocated with directories named test
at each package. Consult the Jest docs and existing test cases for how to write new test specs. Here are some additional guidelines: