how-to-contribute.mdx 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ---
  2. title: How to Contribute
  3. summary: This guide explains how to contribute to Tabler, from setting up a development environment to making and testing changes. It covers essential steps like forking the repository, installing dependencies, and submitting a pull request to help improve Tabler's features and functionality.
  4. description: Guide to contributing to Tabler and setting up for development.
  5. ---
  6. Contributions are always welcome and highly encouraged! Whether you're new to open source or a seasoned contributor, your input helps make Tabler better for everyone. If you're new to open source, [start here](https://opensource.guide/how-to-contribute/) to learn more about contributing.
  7. ## Contribution Requirements
  8. When contributing to Tabler, please adhere to the following guidelines:
  9. 1. By submitting a contribution, you grant a non-exclusive license to the Tabler project to use your contribution in any context deemed appropriate.
  10. 2. If your contribution includes content from other sources, it must be appropriately licensed under an open source license.
  11. 3. Contributions must be submitted via GitHub pull requests.
  12. 4. Ensure your code works in all supported browsers (refer to our [browser support documentation](/docs/ui/getting-started/browser-support)).
  13. ## Installation
  14. Follow these steps to set up Tabler for development:
  15. 1. Fork the repository: [Guide to forking](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
  16. 2. Clone the repository to your local machine:
  17. ```bash
  18. git clone https://github.com/YOUR_USERNAME/tabler.git
  19. ```
  20. 3. Create a new branch for your changes:
  21. ```bash
  22. git checkout -b your-branch-name
  23. ```
  24. ## Development
  25. To set up Tabler for development, follow these steps:
  26. <div className="steps">
  27. ### Ensure Node.js and npm are installed
  28. You’ll need Node.js (v20 or higher) and pnpm to compile Tabler’s files. If you don’t have them installed, download and install them from the official websites:
  29. - [Node.js](https://nodejs.org/)
  30. - [pnpm](https://pnpm.io/)
  31. ### Install Ruby and Bundler
  32. Tabler uses Ruby and Bundler to manage dependencies. Install Ruby and Bundler by following the instructions in the [Ruby documentation](https://www.ruby-lang.org/en/documentation/installation/) and the [Bundler website](https://bundler.io/).
  33. ### Install dependencies
  34. Run the following command to install all required npm packages. We recommend using pnpm for faster installation:
  35. ```bash
  36. pnpm install
  37. ```
  38. ### Install Jekyll
  39. Tabler uses Jekyll to build the documentation. Install Jekyll by running the following command:
  40. ```bash
  41. bundle install
  42. ```
  43. ### Start developer mode
  44. Use the following command to enable autocompilation with live reload. This will start a local server at `http://localhost:3000/`:
  45. ```bash
  46. pnpm run dev
  47. ```
  48. ### Make changes
  49. Make your changes in the appropriate folders, such as `./src/` or `./docs/`. Avoid modifying files in `./dist/`, as they are auto-generated during the build process and will be overwritten.
  50. </div>
  51. ## Compiling for Production
  52. Before submitting a pull request, ensure your changes are properly compiled and tested:
  53. 1. Compile the production files
  54. ```bash
  55. pnpm run build
  56. ```
  57. 2. Test all pages to confirm everything works as expected.
  58. ## Submitting Your Contribution
  59. Once your changes are ready, create a pull request (PR) on GitHub. Make sure to include a clear and concise description of the changes and their purpose. Thank you for contributing to Tabler!