Skip to content

Latest commit

 

History

History
135 lines (87 loc) · 5.35 KB

README_contributors.md

File metadata and controls

135 lines (87 loc) · 5.35 KB

README for contributors

Table of content

How to start

As an essential start, you can start installing the project's dependencies:

yarn install

The development process and project architecture are like any other Nx Plugin.

The maintainers recommend having some knowledge about:

Watch this video to know pretty much everything about this plugin development; it's highly recommended.

Nx Plugin

Angular workspace

To test the functionality on an Angular workspace, we need to perform some manual operations

  1. Build the project

    nx build ngx-deploy-npm
  2. Go to the compiled files

    cd dist/packages/ngx-deploy-npm
  3. Create a local version of the package:

    yarn link yalc
    yarn link npx yalc link
  4. On your Angular workspace and:

    yarn link (recomended) yalc
    yarn link ngx-deploy-npm npx yalc add ngx-deploy-npm

Debugging on External Workspaces

There are two ways of debugging:

Option A), the easy one

Pre Step: follow the steps of yarn link as pre step

⚠️ Only works on VsCode!

  1. Place debugger statement or a red-point where you want your deployer to stop.
  2. Build your project nx build ngx-deploy-npm.

On VsCode, create a JavaScript Debug Terminal and execute the command that you want to debug

Option B), the traditional one

Pre Step: follow the steps of yarn link as pre step

  1. Use your favorite Inspector Client to debug

  2. Now, run your command on debug mode using:

    node --inspect-brk ./node_modules/@nx/cli/bin/nx
  3. Use your favorite Inspector Client to debug

    This is the standard procedure to debug a NodeJs project. If you need more information, you can read the official Docs of NodeJs to learn more about it.

    https://nodejs.org/de/docs/guides/debugging-getting-started/

Making a Contribution

  1. Verify the issues. Maybe your problem or request already has been addressed by another member of the community
  2. Fork it
  3. Create your branch
  4. Create your commits using our guidelines
    • If you need help use yarn commit
    • We use the commit history to generate the changelog automagically, do your best describing the changes that you introduce 😄. Creating the commit right is essential.
    • We encourage the use of Unit Tests for the fixes and new features. Don't you know how to write Unit Tests? Don't let that stop your contribution; we are here to help 👋.
  5. Make a PR against main
  6. Wait for the review
  7. Merge and Party 🎉

E2E test

We at this project have E2E tests. They are handy to test production-like scenarios and to have confidence in your changes. We run e2e test for both supported workspaces, Nx and Angular.

Integration test

We have integration test. They are going to test your changes with a wide options of library generators to ensure your changes are not affecting a particular generator.

Continuous Inspection (SonarQube)

We have continuous inspection for each PR that is made; we use SonarQube for this. It will suggest some changes, detect code smells in your changes and, security recommendations. We encourage implementing the changes that Sonar offers.

If you are changing the Sonar configuration file is highly recommended to test the changes locally.

To init the server

  • npm run sonar:init-server To run the analysis
  • npm run sonar:analysis

To inspect the analysis, go to http://localhost:9000. The credentials are admin and password 12345

When are my changes going to be public?

The CI handles the publishment of a new version. We use GitHub actions as CI.

When the maintainers integrate your PR to main, go to the main branch actions and search for the one that belongs to you. The CI will run some tests, if they pass, the next job that publishes your introduced changes will be on hold waiting for approval; once the maintainers approve the launching, your changes will be packed and posted to NPM.