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

safecommit

v1.0.15

Published

用于安全使用git提交的拓展命令

Downloads

8

Readme

SafeCommit

SafeCommit的初衷是规范工程代码风格以及commit风格,与此同时也对开发人员更加的友好和无感知。

环境

  • 系统环境: Mac OS X
  • Node版本: >= 9.9.0

快速上手

1.安装

Node(如果你已经安装node可以跳过此节)

你可以通过Node官网直接下载pkg来手动安装。

或者也可以通过brew来一键安装。

brew install node

安装完成之后,使用下列的命令查看当前Node的版本。

node -v

npm(如果你已经安装npm可以跳过此节)

curl -L https://www.npmjs.com/install.sh | sh

SafeCommit安装

npm install safecommit -g

2.使用

当您想使用git commit操作的时候,请使用git sc进行替代。

3.使用步骤

  1. 选择当前仓库的语言环境

  1. 如果存在违反lint的代码,那么根据不同的语言环境将会输出不同的提示

  1. 代码都符合规范,那么会提示本次提交的相关信息

  1. 最后提交成功

注意:如果您习惯使用SourceTree等GUI工具,那么请您在您的项目中至少第一次使用git sc进行提交,此后的所有操作都可以在您的GUI工具中进行。

4. 进阶使用

1.重置当前仓库的配置(还原配置)

使用该命令可以使得你当前的仓库重置,所有的设定都还原初始。

git sc -s

或者

git sc --reset

2.配置全局文件

如果你希望使用团队统一的配置,将配置文件保存在远程Git仓库中,然后通过下面的命令进行全局配置。 配置完成之后,所有的Swift工程都将应用该配置,除非该工程本地存在.swiftlint.yml文件。

git sc -c <https://example/swiftlint.yml>

或者

git sc --swift-config <https://example/swiftlint.yml>

3.Git镜像

如果您还是更习惯于通过类似git commit -m 'this is a message'的方式来提交代码,那么我们也提供了Git的镜像功能。

git sc -m this is a message'

4.自动格式化

如果您所使用的lint工具支持自动格式化,那么您可以使用以下的指令来进行自动格式化。

git sc -a

或者

git sc --auto-format

5. 常见问题

1. 无法找到最新的版本号

请尝试下列命令之后再安装:

npm config set registry https://registry.npmjs.org/

贡献

感谢以下开发者的贡献。