3.6 KiB
Contributing
If you have an idea or feature request please open an issue, even if you do not have time to contribute!
Making Changes
Important
This guide assumes you have a functioning Node.js and npm installation. A recent release (Node.js 20 or later) is required to build this plugin. Long-term support (LTS) releases are recommended for local development.
To get started, fork this repository on GitHub and clone a working copy for development:
$ git clone git@github.com:YOUR-USERNAME/obsidian-command-line.git
Tip
For local development, it is recommended to create the working copy in the
pluginsdirectory. The directory name should match the plugin ID. See the Obsidian Docs for details.
After cloning, install dependencies by issuing:
$ npm ci
Several scripts are defined in package.json to aid plugin development. Once you have finished making changes, run tests by issuing:
$ npm test
Finally, commit changes and create a pull request against the default branch for review. At a minimum, there should be no test regressions and additional tests should be added for new functionality.
Tip
Code quality checks are enabled for this repository. To run checks manually, issue
npm run check. A Git pre-commit hook is also available to run checks automatically, which can be installed by issuingnpm run install-hooks.
Making Releases
Making releases is automated by GitHub Actions. Releases are created from the default branch; as such, tests should be passing at all times.
To make a release, perform the following in a feature branch:
-
Create a new section in CHANGELOG.md for the release, and move items from Unreleased to this section. Links should be updated to point to the correct tags for comparison.
-
Run
npm versionwith the appropriate arguments to bump the version. -
Commit outstanding changes by issuing:
$ git commit -a -m "Release <version>" -
Push changes and open a pull request. Verify the results of the CI workflow before merging.
-
Once merged, pull changes and create a release tag from the default branch branch by issuing:
$ git tag -a -m "Release <version>" <version> -
Push the release tag to the remote repository and verify the results of the Release workflow:
$ git push origin --tags
Important
Release tags must match the version specified in manifest.json. See the Obsidian Docs for more details.
License
By contributing to this repository, you agree that your contributions will be licensed under its Simplified BSD License.