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

command-cli

v1.2.0

Published

命令行工具

Downloads

5

Readme

脚手架工具

一个比较轻便的命令行工具,功能包含一键提交代码,一键替换配置,一键合并代码等(如果遇到冲突,要手动解决),后续会持续丰富他的功能点。

安装教程 install

  • 全局安装
npm i command-cli -g

功能和使用方式

command-cli 可以直接在命令行工具中执行,也可以在 package.json 的 scripts 标签里面定义命令

1. 自动提交代码

command-cli push -m feat:更新的内容

参数:

  • --message(-m 缩写) :后面带的是代码提交的内容备注信息, 不传自动帮你加 feat:时间戳

在这里插入图片描述 在这里插入图片描述

2. 合并代码

command-cli merge-branch --targetBranch dev --mainBranch master

参数:

  • --mainBranch (-m 缩写): 以该分支为准合并目标分支
  • --targetBranch (-t 缩写): 被合并的分支

ps: 合并了有点久 请见谅 下次优化成有 loadding 效果的 留意左下角的分支,自动切换,自动合并 在这里插入图片描述

3. 替换文件

command-cli replace-file --oldFile test-oldFile.js --newFile test-newFile.js

参数:

  • --oldFile(-o 缩写): 被覆盖的文件
  • --newFile(-n 缩写): 替换其他文件的文件

文件替换,方便做动态配置 在这里插入图片描述

4. 自动提交代码+合并代码

command-cli push-merge --targetBranch dev  --mainBranch master

参数:

  • --mainBranch (-m 缩写): 以该分支为准合并目标分支
  • --targetBranch (-t 缩写): 被合并的分支

5. 可以把命令放在 package.json 里面,下次很方便使用,用快捷命令就好了。

	// 如
	yarn push -m feat:unpdate xxx
	yarn merge-branch
	...

在这里插入图片描述

查看帮助

command-cli --help

喜欢的可以给个 start

有 bug 可以提 issues

https://github.com/dengzhifeng/command-cli/tree/master