dutchie

1.2.0 • Public • Published

Dutchie

Dutchie

A shepherd for your commits and changelog

GitHub release CircleCI license


Dutchie is a command line utility for Node.js that helps you maintain a simple, standardized format across all of your commit messages. The standard is derived from the excellent Commitizen project.

In addition to providing an easy-to-use CLI for making commits, Dutchie also manages your CHANGELOG.md file, so you'll never have to worry about creating and maintaining detailed and accurate release notes again.


Table of Contents

Features

  • Simple, consistent commit message formatting (via Commitizen)
  • One command updates your changelog and pushes a new Git tag for every release
  • Semantic Version automatically determined based on commit types
  • Quick and easy setup, with zero configuration (via NPM scripts)
  • Easy-to-use, guided command line interface (via Inquirer)
  • Runs on Node.js v8+

Documentation

Installation and Setup

Install as a devDependency:

npm install -D dutchie

Add the commit and release scripts to your package.json file:

{
  "name": "my-project",
  "version": "0.0.1",
  "scripts": {
    "commit": "dutchie --commit",
    "release": "dutchie --release"
  },
}

Making New Commits

When you're ready to commit your changes, your workflow will look something like this:

# Stage your changes 
git add .
# Run Dutchie's guided commit CLI 
npm run commit
# Push your changes 
git push

Note: Dutchie doesn't make many assumptions about your Git workflow. Other than handling commit messages and managing your changelog, it tries its best to stay out of your way.

Creating a New Release

The release command will automatically create or update your CHANGELOG.md file, update the version in your package.json file, create a new Git tag for the version, and push all of the changes upstream.

There are only two requirements for creating a release:

  1. Have one or more previous commits, ideally using dutchie --commit
  2. Have no local changes

Once you're ready to create a release, run:

npm run release

If this is your first release, the CHANGELOG.md file will be created for you, and the version will be pulled from your package.json as is.

For subsequent releases, the version will automatically be bumped based on the types of commits since your last release. If any of the commits contain a feature, the release will be a minor bump (e.g. from 1.0.0 to 1.1.0), otherwise, it will be a patch (e.g. from 1.0.0 to 1.0.1).

To force a major release, use the --major argument:

npm run release -- --major

To add this release to GitHub's "releases" feature, use the --github argument:

npm run release -- --github

Note: The --github argument requires that you have created a GitHub personal access token with access to your repository and configured as an environment variable named GITHUB_TOKEN. You must also have a remote origin URL in a similar format to git@github.com:justinsisley/Dutchie.git. You can check your remote origin URL by running git config --get remote.origin.url.

Contributing

Dutchie has a few core goals:

  1. Help software teams maintain a detailed yet simple standard across all of their commit messages
  2. Help software teams generate a detailed and accurate changelog and release tags for every new version

With these goals in mind, contributions are always welcome.

Linting

Run ESLint with npm run lint.

Testing

Run unit tests with npm test.

FAQ

What's with the name?

The Dutch Shepherd is a relatively uncommon breed of dog that's hard-working, intelligent, and loyal. Often, they're referred to as "Dutchies".

This library aims to do the hard work of intelligently managing your commit messages and changelog without breaking a sweat or complaining. Like the canine, Dutchie aims to be hard-working, intelligent, and loyal.

Can't I just use Commitizen directly?

Absolutely. If Commitizen and its ecosystem of plugins work for you and your team, by all means, use them.

This library aims to strike a balance between simplicity and detail, and to increase the quality of commit messages and changelogs by providing a straightforward CLI that developers can become familiar with very rapidly.

Credits

Icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

Readme

Keywords

none

Package Sidebar

Install

npm i dutchie

Weekly Downloads

6

Version

1.2.0

License

MIT

Unpacked Size

21.9 kB

Total Files

16

Last publish

Collaborators

  • justinsisley