npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cleaner-commitizen-adapter

v1.0.4

Published

A custom Commitizen adapter/config for creating standardized commit messages with fewer terminal prompts and boilerplate.

Downloads

13

Readme

Cleaner Commitizen Adapter

A custom Commitizen adapter/config for creating standardized commit messages with fewer terminal prompts and boilerplate. ✨

This stuff makes it look like you know what you're doing, dawg. 👀

t-rec

commit a401633a9362c3940c447daeaebaf264582da0f7
Author: Remco Stoeten <[email protected]>
Date:   Sat Jun 8 06:54:43 2024 +0200
chore: This video is such a chore man....

Installation

Since it's an adapter for Commitizen, you need to have Commitizen installed globally:


# Install Commitizen globally

npm install -g commitizen

# Install this package globally

npm install -g cleaner-commitizen-adapter

Commitizen does not support custom configuration via their own config file. To use this adapter you need to create a .czrc file in your home directory and set the path to the adapter. Edit/create the file with vim ~/.czrc and add the following line: { "path": "cleaner-commitizen-adapter" }. This will tell Commitizen to use the custom adapter.

Alternatively, you can run the following command to create the file with the correct content in one go:

echo '{ "path": "cleaner-commitizen-adapter" }' > ~/.czrc

Usage

To use this adapter with Commitizen, run:

cz

Answer the prompts to generate a standardized commit message.

Prompts

  1. Type of Change: Select the type of change you are committing. Options include:

    • feat: A new feature
    • fix: A bug fix
    • docs: Documentation only changes
    • style: Changes that do not affect the meaning of the code
    • refactor: A code change that neither fixes a bug nor adds a feature
    • test: Adding missing tests or correcting existing tests
    • chore: Changes to the build process or auxiliary tools
  2. Commit Message: Write a short, descriptive commit message.

Efficient Usage with zsh Alias

If you find the cz command annoying or having to git add, or push prior to running cz, you can create an alias in your .zshrc file to run the CLI tool with a single command.

  1. Open .zshrc Or .bashrc if you're using bash:

    vim ~/.zshrc
  2. Add alias:

    alias commit='cz'

Now, you can use the alias commit to quickly run the CLI tool. This allows you to type commit which could be more intuitive than cz.

Another one which I personally use, but must be used with caution due to the adding everything and pushing instantly is:

alias push='git add . && cz && git push'

A safe way to use this, but which is a little bit more time-consuming is to use the following alias:

alias push='git add . && cz && echo "You are about to push $(git diff --cached --numstat | wc -l) files." && echo "Are you sure you want to push these changes? (y/n/c) [Yes/No - commit only/No - abort all]" && read ans && if [[$ans = "y"]]; then git push; elif [[$ans = "n"]]; then echo "Changes committed, but not pushed."; else echo "Operation aborted."; git reset HEAD~; fi'

This will ask you after the commit if you want to continue with X files or not, giving you the option to push, quit, or only commit.

xxx love y'all,

Remco Stoeten