|
| 1 | + |
| 2 | +# Contributing to holo-fn |
| 3 | + |
| 4 | +Thank you for your interest in contributing to **holo-fn**! To keep things organized and make it easier for you to get involved, please read through the guidelines below. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## 🚀 Setup |
| 9 | + |
| 10 | +### 1. Install Dependencies |
| 11 | + |
| 12 | +To get started, clone the repository and install the dependencies: |
| 13 | + |
| 14 | +```bash |
| 15 | +git clone https://github.com/yourusername/holo-fn.git |
| 16 | +cd holo-fn |
| 17 | +npm install |
| 18 | +``` |
| 19 | + |
| 20 | +### 2. Running Tests |
| 21 | + |
| 22 | +You can run the tests using Jest to ensure everything works as expected: |
| 23 | + |
| 24 | +```bash |
| 25 | +npm run test |
| 26 | +``` |
| 27 | + |
| 28 | +### 3. Test Coverage |
| 29 | + |
| 30 | +To check test coverage: |
| 31 | + |
| 32 | +```bash |
| 33 | +npm run test:cov |
| 34 | +``` |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## 📦 Building |
| 39 | + |
| 40 | +To build the project: |
| 41 | + |
| 42 | +```bash |
| 43 | +npm run build |
| 44 | +``` |
| 45 | + |
| 46 | +This will transpile the TypeScript code into JavaScript. |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 🧰 Testing Locally |
| 51 | + |
| 52 | +To test your changes locally before publishing or linking the library: |
| 53 | + |
| 54 | +1. Build the Library: |
| 55 | + |
| 56 | + - Run the following to build the project and prepare the files for testing: |
| 57 | + ```bash |
| 58 | + npm run build |
| 59 | + ``` |
| 60 | + |
| 61 | +2. Pack the Library: |
| 62 | + |
| 63 | + - After building, run npm pack to create a .tgz file that you can install locally: |
| 64 | + ```bash |
| 65 | + npm pack |
| 66 | + ``` |
| 67 | + |
| 68 | +3. Install Locally in Your Test Project: |
| 69 | + |
| 70 | + - In the project where you want to test the library, run the following: |
| 71 | + ```bash |
| 72 | + npm install /path/to/holo-fn-<version>.tgz |
| 73 | + ``` |
| 74 | + |
| 75 | + - This will install the library locally in your project, and you can import and use it as if it were an npm package. |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## 🤝 How to Contribute |
| 80 | + |
| 81 | +1. **Fork the repository** to your GitHub account and clone it locally. |
| 82 | +2. **Create a new branch** for your feature or fix: |
| 83 | + ```bash |
| 84 | + git checkout -b feat/issue-number-or-short-description |
| 85 | + ``` |
| 86 | +3. **Make your changes**: add your feature or fix the bug. |
| 87 | +4. **Commit your changes**: |
| 88 | + ```bash |
| 89 | + git commit -am 'feat: add new feature' # or 'fix: resolve issue' |
| 90 | + ``` |
| 91 | +5. **Push to your fork**: |
| 92 | + ```bash |
| 93 | + git push origin feat/issue-number-or-short-description |
| 94 | + ``` |
| 95 | +6. **Create a pull request** from your fork to the main repository. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## 🎯 Guidelines |
| 100 | + |
| 101 | +- Please **write clear commit messages**. |
| 102 | +- Ensure all code is **properly tested**. |
| 103 | +- Follow the **code style** used in the project. |
| 104 | + |
| 105 | +Thank you for contributing! 🚀 |
0 commit comments