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

git-smart-commit

v0.1.4

Published

This tool generates smart TODO comments for Git changes to nudge users to document them before commit.

Downloads

7

Readme

Git Smart Commit

This tool generates smart TODO comments for Git changes to nudge users to document them before commit.

Installation

  • Run npm install git-smart-commit into your app and then follow the steps.

Working

Click below to watch the video

Git Smart Commit

  • Make changes to your code
  • Do git add .
  • Do git commit -m "your message"
  • The script will catch your message, run its own inspection to ask you to document the changes you have made.
  • It won't commit your changes until all the changes have been documented in this git commit.
  • If all goes well, script checks your message format and proceed to commit.

Imgur

  • This is how the script appends the smart comment at the line where changes were made.
  • All you have to do is replace TODO with FIX|DEBUG|INFO and enter your message to match the allowed format.

Imgur

Dependency

Make sure that your system has all these installed pre-hand.

  1. Git
  2. Sed
  3. Node

Post Installation Steps

  1. Make any small change in any of your file
  2. git add .
  3. git commit -m "your message"
  4. Notice the changes you have made in your files and document them
  5. That's it! Push the changes to your branch.

Add-on commands

I have added some add-on commands that give you full control over this package:

  1. Pause : Pauses the commit validation until you restart. Good when you don't want to validate something.

     npm run pause-smart-commit
  2. Restart : Restarts the paused smart commit package.

     npm run restart-smart-commit
  3. Un-install : Removes the smart commit validation from git and allow you to work normally.

     npm run uninstall-smart-commit
  4. Install : Installs the smart commit validation back into git

     npm run install-smart-commit

Tested on

  1. Linux
  2. Mac

TODO

  1. Test and adapt to windows
  2. Add more file support for comments
  3. Integrate ChatGPT for smart commit message to assist better.

Author

Sagar Chauhan works as a Senior Product Manager - Technology at Greenhonchos. In his spare time, he hunts bug as a Bug Bounty Hunter. Follow him at Instagram, Twitter, Facebook, Github

License

MIT