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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hometownjs/command

v1.0.0

Published

HoMeTownJS's command tools.

Readme

What

@hometownjs/command is a command tools, Built-in multiple auxiliary scripts for developers to use, including git, npm and other dimensions.

Provide commands:

Install

npm install @hometownjs/command --save-dev

Usage

Terminal

hmt [commandname]
# or
hometown [commandname]

package.json (more recommend)

Because of the configuration of some items, the error that the command cannot be found may be reported when directly used at the terminal. Therefore, it is more recommended to configure scripts in package.json.

{
  "scripts": {
    "set-npmreg": "hometown set-npmreg"
  }
}

Execute command

# npm
npm run set-npmreg
# pnpm
pnpm set-npmreg
# yarn
yarn set-npmreg

Commands

set-npmreg

Set the official image source of npm.When the setting is successful, you will be prompted success!!!

set-npmreg-taobao

Set the TaoBao image source of npm.When the setting is successful, you will be prompted success!!!

git-commit

Generate git commit conforming to Angular specification.

There are three steps to generate git-commit:

  • types
  • scopes
  • description

The configuration is as follows:

export const types = [
  { value: 'init', title: 'init:     项目初始化' },
  { value: 'feat', title: 'feat:     添加新特性' },
  { value: 'fix', title: 'fix:      修复bug' },
  { value: 'docs', title: 'docs:     仅仅修改文档' },
  { value: 'style', title: 'style:    仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑' },
  { value: 'refactor', title: 'refactor: 代码重构,没有加新功能或者修复bug' },
  { value: 'perf', title: 'perf:     优化相关,比如提升性能、体验' },
  { value: 'test', title: 'test:     添加测试用例' },
  { value: 'build', title: 'build:    依赖相关的内容' },
  { value: 'ci', title: 'ci:       CI配置相关,例如对k8s,docker的配置文件的修改' },
  { value: 'chore', title: 'chore:    改变构建流程、或者增加依赖库、工具等' },
  { value: 'revert', title: 'revert:   回滚到上一个版本' }
];
export const scopes = [
  ['projects', '项目搭建'],
  ['components', '组件相关'],
  ['hooks', 'hook 相关'],
  ['utils', 'utils 相关'],
  ['types', 'ts类型相关'],
  ['styles', '样式相关'],
  ['deps', '项目依赖'],
  ['auth', '对 auth 修改'],
  ['release', '版本发布'],
  ['other', '其他修改']
]

cleanup

Emptying dependencies and building artifacts.

tagrgets:

node_modules
dist
package-lock.json
yarn.lock
pnpm-lock.yaml
./**/node_modules
./**/dist
./**/package-lock.json
./**/yarn.lock
./**/pnpm-lock.yaml

git-commit-verify

Verify whether the commit of git conforms to the Angular specification.

init-git-hooks

Initialize git hook.

Firsd u need install this:

npm install simple-git-hooks --save-dev

Then add config to package.json:

  "simple-git-hooks": {
    "commit-msg": "pnpm hometown git-commit-verify",
    "pre-commit": "pnpm exec lint-staged --concurrent false"
  }

Final just commit.Commit will execute the hook here.

update-pkg(use with caution)

Upgrade Dependency, This operation will update all your dependent versions. So be careful!!!.

Author

HoMeTown 🙊