First of all, welcome! We look forward to having your awesome plugin and contributions in this organization and are available for help if need be.
This guide lays out expectations and conventions used by all projects in the capacitor-community
organization. Please read it to make sure your projects are set up and configured correctly.
- Start here
- Conventions
- Project Setup
- Project Licensing
- Publishing
- Recognizing Contributors
- Where to Get Help
Before adding your project to the capacitor-community
org, make sure you have been granted access to the capacitor-community
GitHub org and @capacitor-community
npm scope.
In terms of package naming, your packages should be named as simply as possible, without any capacitor
or plugin
words in the package name itself. Packages must be published in the @capacitor-community
npm scope.
For example, the Native HTTP plugin is published under @capacitor-community/http
.
One of the goals of the Capacitor Community initiative is to have a set of github repos that follow a set of conventions around READMEs, package naming, licensing, code style, tooling, and more.
As such, there are a number of conventions that you should follow:
First, make sure when creating a new repo to use the .github
repo as a template. This will pull in issue templates, a code of conduct, and more.
Next, follow the project setup steps to install a code formatter, changelog generator, and more.
Finally, projects should follow the Conventional Commits process for creating a nice changelog on release (more info soon)
Update the provided README.md
with the details of your package.
Projects should install the following packages:
npm install --save-dev husky prettier prettier-plugin-java pretty-quick np
These packages setup pre-commit hooks, code formatting, and publishing utilities. Husky manages git hooks without having to manually set them up, prettier
and prettier-plugin-java
automatically format code based on a set of code style configurations, and np
is a complex npm publishing script that automatically handles tags and other release steps.
Next, make sure to enable Husky scripts for pre-commit
in your package.json
to automatically run prettier on every pre-commit:
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
We strongly encourage your project use the MIT license. Apache 2 is also acceptable. Any other license must be approved with the Capacitor core team in advance to avoid licensing surprises.
Your next step after creating the project should be to update the LICENSE
file and fill in the correct year and copyright holder information.
To publish your package, we recommend adding an npm script to your package.json
called shipit
that runs np
. You can also run that manually, if you prefer.
Recognizing contributors is important. Every project in the capacitor-community
GitHub org is automatically set up to use All Contributors and maintainers should recognize any community members that contribute by following the All Contributors usage guide.
While the Capacitor Community organization is a community-driven environment, it is facilitated by the core Capacitor team at Ionic. If you are ever in need of help, don't hesitate to tweet at one of us or send us an email.