Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them.
We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR.
- Fork and clone the repository.
- Configure and install the dependencies:
npm install
. npm run prod
- Run development:
npm run dev
. This step will install a temporary local vue-data-ui - Create a new branch:
git checkout -b my-branch-name
. - Make your change, add tests, and make sure the tests still pass by running
npm run prod
. - Push to your fork and submit a pull request.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Write and update tests.
- Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a good commit message
- "Fix - {component name} - {description of the fix}"
- "New feature - {component name} - {description of the feature}"
Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you.
All components of the library use a configuration object holding default values, allowing the user to provide the config prop with only the attributes they need to tweak.
If a feature requires additional default configuration:
- update the
useConfig.js
file - update the types in
vue-data-ui.d.ts
file - update the testing arena with the new config items
When adding features involving slots, emits or exposed methods, please update the README file under the components section.
The VueDataUi universal component can be the sole component imported by users. It will async import the selected component, making a lighter use of the library.
If a feature added in a component requires the addition of a new emit or a new exposed method, they need to be referenced in the vue-data-ui.vue component.
The testing arena provides a quick way to visually test changes made on components, and toggle inputs to test configs.
npm run dev
starts the dev server and serves a page where components are listed (App.vue).
The page shows either 4 or 5 versions of the tested component:
- responsive version (if applicable) in a resizable container
- local component
- local VueDataUi component
- build component
- build VueDataUi component
All versions 2 to 5 must be identical after running npm run prod
then npm run dev
The testing arena is pretty raw in terms of layout. Feel free to make it better ;)
-
Unit tests (Vitest)
npm run test
to run, add-w
flag to watch
-
Component tests (Cypress, Component testing)
npm run test:e2e
to open Cypress