Contributing To AdonisJs #18

Open
thetutlage opened this Issue Jan 6, 2017 · 0 comments

Projects

None yet

1 participant

@thetutlage
Member
thetutlage commented Jan 6, 2017 edited

First of all thanks for considering AdonisJs. This guide will help you on how to make your contribution to the framework core or create supported add-ons to be used by everyone.

Contributing to existing codebase.

  • Make sure to read RFC guidelines and create an RFC only when the change is significant or will break the existing implementation.
  • Fork the desired repo and make changes inside a feature branch.
  • Keep your changes small and concise. Do not add everything to a single commit/PR.
  • Add documentation for the changes being made.
  • Make sure to respect code doc blocks since they are used for generating automatic API docs.

Writing your own addons/provider/module.

Writing a new module to be used by everyone comes with great responsibility. You can create any modules for AdonisJs as you want, but if you want them to be considered and recommended by the core team, we suggest to read the following points.

  • Create an RFC for the module, so that we all can discuss the desired features/implementation and make sure only one person is working on a given feature.
  • If your RFC gets approved, you will have to follow hard coding guidelines, that is to make sure that any community member can maintain that project in the future if you opt not to.

Coding Guidelines

  • Make sure to have proper doc blocks in place, so that AdonisJs can generate automatic API docs for your Haddon.
  • Add guides for your addon/provider to the docs repo. The doc files need to be one-level deep.
  • All guides are written using asciidoc, since that’s the tool for writing professional docs.
  • Write enough tests to cover every edge case. Having 100% coverage is not important but making sure all major parts of the code are well tested is important.
  • Reach out for help on Gitter or Github whenever required.

Debugging Vs Logging

Debugging is mainly done when developing the application and as a developer one wants to see what all actions are taken by the 3rd party modules. It is recommended to make use of debug for adding debug statements to your code.

Whereas logging is done on production under the app code to make sure all exceptions or unexpected behaviour is caught. Adonis cat-log will be used for that and any module should not make use of cat-log.

Happy coding 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment