Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cpa

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpa

Modify package.json filed version and auto add-commit when checkout new branch. ===============================================================================

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Modify package.json filed version and auto add-commit when checkout new branch.

切换分支的同时修改package.json的版本号到daily/0.0.1中的斜线后面的数字版本

Notes

目前 node.js 版本必须在7.0以上, 需要原生支持asyncFunction

Install

npm install -g cpa

Description

上面的命令会在命令行中添加命令cbm

Usage

命令行中输入 cbm daily/0.0.1

会输出辅助信息

执行: 切换到新分支
checkout branch successful.
Switched to a new branch 'daily/0.0.2'
执行: 更新package.json version字段
update package.json field version successful.
更新结果为:
"version": "0.0.2",
执行: git add package.json
command `git add` execute successful.
执行:git commit -m '更新package.json的version字段'
[daily/0.0.2 5733653] 更新package.json的version字段
 1 file changed, 26 insertions(+), 26 deletions(-)
 rewrite package.json (99%)
command `git commit  -m 更新package.json的version字段` executed successful.

此时说明package.json中的version字段已经被更新, 并且创建了一次提交将package.json的修改提交到本地仓库, 但是并不会push到远程仓库.

FAQs

Package last updated on 26 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc