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

b2c-tool

v1.0.0

Published

### 安装

Downloads

4

Readme

paas业务组件管理

安装

需要安装node环境

使用

目前还没有放到npm包上去, 先 git clone [email protected]:b2c-paas-biz_models/b2c-tool.git , 执行npm link后可以使用该工具

b2c项目另起一个工作目录 先 git clone [email protected]:b2c-paas-biz_models/b2c-components.git 进入项目的根目录里面执行 gitp init

子命令 create 创建分支或者tag

gitp create -b 2019-03-21-yen -t v190325-yc -n b2 c-jssdk,b2c-common
-b 别名 branch 创建的分支名称
-t 别名 tag 创建的tag名称
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部
-b 和 -t 至少指定一个名称

子命令 merge 合并分支代码

gitp merge -f 2019-03-21-yen -to test -n b2c-jssdk,b2c-common
-f 别名 from 需要合并的分支 (必需)
--to 别名 to 合并到哪个分支 (必需)
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部

子命令 delete 删除分支或者tag

gitp delete -b 2019-03-21-yen --origin -n b2c-jssdk,b2c-common
-b 别名 branch 需要删除的分支,多个逗号分隔
-t 别名 tag  需要删除的tag,多个逗号分隔
-o  别名 origin 是否删除远程分支或者tag
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部
-b 和 -t 至少指定一个
默认删除的都是本地分支,通过 -o --origin 指定是否一起删除远程分支或者tag

子命令 status 查看组件库状态

gitp status b2c-jssdk,b2c-common
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部

子命令 tag 查看组件库的tag

gitp tag  b2c-jssdk,b2c-common
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部

子命令 branch 查看组件库的分支

gitp tag  b2c-jssdk,b2c-common
-a 别名 all 是否查看所有分支包括远程,-a --all
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部

子命令 pull 拉取分支代码

gitp pull -b master
-b 别名 branch 需要更新的分支名称,不指定默认更新当前分支
-n 别名 name 需要操作的业务组件名称,基于目录名查找,多个逗号分隔,不填默认全部

子命令 init 初始化整个项目目录

gitp init
根据根目录的git.json读取
例如B2C项目下的 https://git.mysoft.com.cn/b2c-paas-biz_models/b2c-components的git.json

json结构

    {
        "b2c-jssdk": {
            "repository": "[email protected]:b2c-paas-biz_models/b2c-jssdk.git",
            "hook": true
        },
        ......
    }

子命令 rename 整个项目目录git文件重命名

重命名自己的git文件,因为代码编辑器不能很好的管理子git的一些操作,这里根目录移除掉,

子命令 reset 整个项目目录git文件还原

还原根目录的代码git文件,如果需要使用根目录库的时候记得先还原

可以使用gitp -h查看帮助文档。