Contributing to Angulartics2
We welcome contributions from the community! Please follow these guidelines to ensure a smooth and effective collaboration process.
Code of Conduct
This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.
Getting Started
- Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/your-username/angulartics2.git cd angulartics2 -
Install dependencies: This project uses
yarnfor package management.yarn install
Development Scripts
The package.json file contains several scripts to help with development:
-
Run the demo app:
yarn start -
Build the library: The library is built using
ng-packagr.yarn build -
Run tests: We use Karma and Jasmine for unit testing.
# Run tests once in a CI environment yarn test # Run tests in watch mode yarn test:watch -
Lint the code: We use ESLint to maintain code quality.
yarn lint # To automatically fix linting issues yarn lint:fix
Submitting a Bug Report
- Ensure you are using the latest version of Angulartics2.
- Run
yarn run clean:installafter updating your local repository to ensure all dependencies are fresh. - If possible, provide a minimal demo of the problem (e.g., using a StackBlitz or a minimal GitHub repository).
- Include details about your environment: Angular version, Node version, browser, and operating system.
Submitting a Pull Request
-
Create a new branch for your feature or bugfix:
git checkout -b my-new-feature -
Make your changes. Ensure you add or update unit tests for any new functionality.
-
Run the linter and tests to ensure everything is passing:
yarn lint yarn test -
Commit your changes: This project uses semantic-release for automated releases, which relies on conventional commit messages. A script is provided to help you format your commits correctly.
This will launch an interactive prompt to guide you through creating a compliant commit message.yarn run commit -
Push your branch to your fork on GitHub:
git push origin my-new-feature -
Open a pull request from your fork to the
masterbranch of theangulartics/angulartics2repository. - Provide a clear description of your changes in the pull request.
Thank you for contributing!