Skip to content

Latest commit

 

History

History
160 lines (93 loc) · 5.09 KB

CONTRIBUTING.md

File metadata and controls

160 lines (93 loc) · 5.09 KB

Contribution Guidelines

We would love for you to contribute to this project. As a contributor, here are the guidelines we would like you to follow:

Be Kind - Code of Conduct

Please read and follow our Code of Conduct to help us keep this project open and inclusive.


Found a bug? Want a feature? - Submit an Issue

Choose an issue template to file a bug report / feature request.


Ready to contribute a Pull Request (PR)?


Try to find an open or closed PR that relates to the change you want to introduce.


▶ 2. Before you start coding - find / create an issue

Make sure there's an issue describing the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design up front helps to ensure that we're ready to accept your work.

Don't waste your time working on code before you got a 👍 in an issue comment.


▶ 3. Fork the this repo and create a branch.

  • Hit that "Fork" button above (in this repo's github page).

image

  • git clone your fork

git clone YOUR_FORK_URL

Get your url by from here 👇

image

  • Create a new branch locally in your fork's repo
git checkout -b my-fix-branch master

▶ 4. Make sure you add / modify tests

Run pnpm run test to make sure there aren't any errors


▶ 5. Commit your changes using commitizen:

Instead of git commit use the following command:

pnpm run commit

It will then ask you a bunch of questions.

This will create a descriptive commit message that follows the Angular commit message convention.

This is necessary to generate meaningful release notes / CHANGELOG automatically.


▶ 6. Push your branch to GitHub:

git push origin my-fix-branch

▶ 7. Create a PR

In GitHub, create a pull request for qwikifiers/qwik-nx:master.

Make sure you check the following checkbox "Allow edits from maintainers" -

image

If you need to update your PR for some reason -

  • Make the required updates.

  • Re-run the tests to ensure tests are still passing npm run test

  • Rebase your branch and force push to your GitHub repository (this will update your Pull Request):

    git rebase master -i
    git push -f

▶ 8. After your PR is merged - delete your branches

After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:

  • Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:

    git push origin --delete my-fix-branch
  • Check out the master branch:

    git checkout master -f
  • Delete the local branch:

    git branch -D my-fix-branch
  • Update your master with the latest upstream version:

    git pull --ff upstream master

▶ 9. Publishing to a local registry

To test if your changes will actually work once the changes are published, it can be useful to publish to a local registry.

  • Run pnpm run local-registry start in Terminal 1 (keep it running)
  • Run npm adduser --registry http://localhost:4873 in Terminal 2 (real credentials are not required, you just need to be logged in. You can use test/test/[email protected].)
  • Run pnpm run local-registry enable in Terminal 2
  • Run pnpm exec nx run qwik-nx:publish:local in Terminal 2. You can set the version you want to publish in the package's package.json file.

If you have problems publishing, make sure you use Node 18 and NPM 8. Alternatively to running the project's "publish" target you can build and publish manually by running pnpm exec nx build:qwik-nx && cd dist/projects/qwik-nx && npm publish --registry=http://localhost:4873

NOTE: After you finish with local testing don't forget to stop the local registry (e.g. closing the Terminal 1) and disabling the local registry using pnpm run local-registry disable. Keeping local registry enabled will change your lock file resolutions to localhost:4873 on the next pnpm install. You can also run pnpm run local-registry clear to clean all packages in that local registry.

NOTE: To use this newly published local version, you need to make a new workspace or change your target package to this new version, eg: "qwik-nx": "^1.0.0", and re-run pnpm install in your testing project.

▶ 10. That's it! Thank you for your contribution! 🙏💓