sstallion_obsidian-command-.../CONTRIBUTING.md
2025-03-11 15:03:19 -05:00

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 plugins directory. 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 issuing npm 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:

  1. 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.

  2. Run npm version with the appropriate arguments to bump the version.

  3. Commit outstanding changes by issuing:

    $ git commit -a -m "Release <version>"
    
  4. Push changes and open a pull request. Verify the results of the CI workflow before merging.

  5. Once merged, pull changes and create a release tag from the default branch branch by issuing:

    $ git tag -a -m "Release <version>" <version>
    
  6. 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.