Skip to content

Latest commit

 

History

History
74 lines (41 loc) · 4.26 KB

CONTRIBUTING.md

File metadata and controls

74 lines (41 loc) · 4.26 KB

Contributing to generator-ngx-rocket 🚀

Thank you for contributing to the ngX-Rocket generator! ❤️

Report a bug

Before creating an issue please make sure you have checked out the docs. You might want to also try searching Github. It's pretty likely someone has already asked a similar question.

If you haven't found your answer please feel free to create an issue on Github.

Issues can be reported in the issue tracker. Since the generator have various combinations and is updated frequently, it can be hard for us to assess the root cause without knowing which modules and versions are being used and what your configuration looks like, so it helps us immensely if you can link to a simple example that reproduces your issue.

Pull Requests

We ❤️ pull requests and we're continually working to make it as easy as possible for people to contribute.

If you want to contribute but don't know on where you can help, check the issues and look for ones with the PR-welcome label.

We prefer small pull requests with minimal code changes. The smaller they are the easier they are to review and merge. A team member will pick up your PR and review it as soon as they can. They may ask for changes or reject your pull request. This is not a reflection of you as an engineer or a person. Please accept feedback graciously as we will also try to be sensitive when providing it.

Although we generally accept many PRs they can be rejected for many reasons. We will be as transparent as possible but it may simply be that you do not have the same context or information regarding the roadmap that the core team members have. We value the time you take to put together any contributions so we pledge to always be respectful of that time and will try to be as open as possible so that you don't waste it. 😄

All PRs should be accompanied with tests and pass the linting rules.

Code style

We use XO code style, which is enforced by ESLint. You should configure your IDE/code editor to report issue directly, as ESLint is supported by most IDE/code editors natively or via plugins.

When using npm test to run tests it will also run ESLint. You can also lint your code changes separately by using npm run lint.

Commit messages

This repo now follows the Conventional Commits for commit messages, to allow automatic releases.

If you are not familiar with conventional commits, instead of using git commit to commit your changes you can use npm run commit for a guided process that will help you follow the conventions. It is based on Commitizen CLI.

Generator contribution mini-guide

  1. Clone this repo.

  2. Install dependencies: npm install

  3. Make the generator available globally, so that using ngx CLI uses your own development version: npm link .

  4. Create a sample folder (or use any other folder external to the project), go in there and generate a base to work from it: ngx new

  5. Init a new git repo and commit make the initial commit: git init && git add . && git commit -m "Initial commit"

  6. Develop from there until you're happy, then report back your changes to the generator templates. Use the git diff to isolate your changes.

  7. Add new test cases, if needed.

  8. Submit pull request against the main branch.

Testing

To run generator tests you can use the npm test script. It will run all test scenarios located under the scripts/tests/ folder.

If your changes add new generator options or prompts, don't forget to create new test scenarios accordingly, see the existing tests for example.

A test scenario consists in running the generator with predefined options, then run the test:ci, e2e and build NPM tasks. See scripts/test.sh for details.

As a complement to this tests, you should also make sure the UI and behavior of the generator is also correct.

Code of Conduct

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.