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

xml-cli

v1.0.0

Published

xml 信明良自己的命令行工具

Downloads

1

Readme

安装

cnpm i -g nchannel-cli

命令行界面

  • 显示命令说明信息
nci -h
  Envirment:
    nodejs >= 8.4.0    webstorm >= 2017.2
  
  Usage: nci <command>
      
    尖括号(例如 <cmd>) 代表必须输入,方括号 (例如:[env]) 代表可选输入

  Options:
    -V, --version  output the version number
    -h, --help     output usage information

  Commands:
    bootstrap|bs                                   安装依赖并自动链接私有包, -例如:nci bootstrap 或 nci bs
    build [clean|c]                                执行或清理babel编译, -例如:nci build 或 nci build clean
    config|cfg [set|unset] [key-path] [key-value]  JSON风格全局配置 -例如:  "nci cfg set scope @nivana" 配置 scope 为 @nirvana
    clean|c                                        清理项目, -例如:nci clean 或 nci c
    docker|dk <build|run>                          生成并发布docker镜像, 例如:构建镜像 nci dk build,测试镜像 nci dk run
    dev [service-name]                             本地开发命令,-例如:nci dev kaniu
    deploy|dep [service-name]                      部署到测试环境 10.10.232.242
    link                                           重新链接私有包, -例如:nci link
    lint                                           ESLint代码规范检查,-例如:nci lint
    package|pkg <add|rm> [package-name]            添加或删除一个私有包,未指定前辍将默认添加 @nirvana 前辍
    project|pjt <add|upgrade> [project-name]       升级工程,框架发生重大变化时执行
    publish|p [pub|nppub]                          发布到私服,-例如:nci publish pub 或 nppub
    submodule|sm <add|rm> <git-repo-url>           添加或删除子项目,基于 "git submodule" 实现
    test|t                                         运行单元测试,-例如:nci test 或 nci t
    update|up                                      更新并链接所有子项目 -例如:nci update 或 nci up
    checkVersion|check                             检查最新版本并自动升级
    help|h                                         显示帮助

  Example:
  
    升级工程
    nci project upgrade 简写 nci pjt up
    
    添加子项目
    nci submodule|sm add http://gitlab.puhuitech.cn/nirvana-dev/nchannel/nchannel-core.git
    nci submodule|sm add http://gitlab.puhuitech.cn/nirvana-dev/nchannel/nchannel-openapi.git
    
    删除指定名称的子项目
    nci submodule|sm rm dependency/nchannel-core 
    
    删除所有子项目
    nci submodule|sm rm 

配置

配置文件路径为: ~/.ncirc.json

{ 
  "scope": "@nirvana",
  "tpub": "test-env-npm-registry-url",
  "pub": "paas-prod-env-npm-registry-url",
  "nppub": "paas-test-env-npm-registry-url",
  "registryUser": "your-npm-user",
  "registryPass": "your-npm-password",
  "registryEmail": "your-npm-email",
  "dockerHost": "company-private-docker-mirror-host",
  "dockerGroup": "your-docker-group",
  "baseImage": "harbor.finupgroup.com/nchannel/phnode:8",
  "dockerUser": "your-docker-user",
  "dockerPass": "your-docker-password",
  "sshHost": "test-server-host",
  "sshPort": "test-server-port",
  "sshUser": "test-server-ssh-user",
  "sshPass": "test-server-ssh-pass"
 }
 

用法说明

  • 升级开发项目,找回自动提醒功能

项目升级,通过 git submodule 子模块方式在当前项目下引入依赖项目 nchannel-core, 保存在当前项目根目录下的 dependency 目录, 并自动将 dependency/packages 下的所有包 linknode_modules

# 请在开发项目下执行 如 'nchannel-kaniu', 'nchannel-openapi'

nci project upgrade #  upgrade 可简写为 up
# 或
nci-project upgrade #  upgrade 可简写为 up
  • 更新依赖项目 nchannel-core

nci update 执行 git submodule update --remote --init, 并自动 linknode_module

nci update # update 命令简写 nci up
# 或
nci-update
  • 安装项目依赖

安装依赖包并自动 linknode_module

nci bootstrap # bootstrap 可简写为 bs