Skip to content

Contributing to holo-fn

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.


🚀 Setup

1. Install Dependencies

To get started, clone the repository and install the dependencies:

1
2
3
git clone https://github.com/yourusername/holo-fn.git
cd holo-fn
npm install

2. Running Tests

You can run the tests using Jest to ensure everything works as expected:

1
npm run test

3. Test Coverage

To check test coverage:

1
npm run test:cov

📦 Building

To build the project:

1
npm run build

This will transpile the TypeScript code into JavaScript.


🧰 Testing Locally

To test your changes locally before publishing or linking the library:

  1. Build the Library:

  2. Run the following to build the project and prepare the files for testing:

    1
    npm run build
    

  3. Pack the Library:

  4. After building, run npm pack to create a .tgz file that you can install locally:

    1
    npm pack
    

  5. Install Locally in Your Test Project:

  6. In the project where you want to test the library, run the following:

    1
    npm install /path/to/holo-fn-<version>.tgz
    

  7. This will install the library locally in your project, and you can import and use it as if it were an npm package.


🤝 How to Contribute

  1. Fork the repository to your GitHub account and clone it locally.
  2. Create a new branch for your feature or fix:
    1
    git checkout -b feat/issue-number-or-short-description
    
  3. Make your changes: add your feature or fix the bug.
  4. Commit your changes:
    1
    git commit -am 'feat: add new feature'  # or 'fix: resolve issue'
    
  5. Push to your fork:
    1
    git push origin feat/issue-number-or-short-description
    
  6. Create a pull request from your fork to the main repository.

🎯 Guidelines

  • Please write clear commit messages.
  • Ensure all code is properly tested.
  • Follow the code style used in the project.

Thank you for contributing! 🚀