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

cliclicli

v0.0.8

Published

clicli-cli for clicliPure

Downloads

1

Readme

cliclicli脚手架

创建npm目录

mkdir cliclicli
cd cliclicli
npm init

安装相关依赖

  • chalk 终端字符串样式库
  • commander node.js 命令行接口的完整解决方案
  • download-git-repo 用Node.js载并提取一个git仓库(GitHub,GitLab,Bitbucket)
  • inquirer 常见的交互式命令行用户界面的集合
  • ora 优雅的终端Loding
  • shelljs Node.js复用Unix Shell命令
  • yargs 解析命令行参数

编写代码

新建command.js, package.json中新增bin字段

{
  "name": "cliclicli",
  "version": "0.0.1",
  "description": "clicli-cli for clicliPure",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "bin": {
    "cliclicli": "command.js"
  },
  "keywords": [
    "cliclicli"
  ],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "chalk": "^3.0.0",
    "commander": "^4.1.0",
    "download-git-repo": "^3.0.2",
    "inquirer": "^7.0.3",
    "joao-cli": "0.0.6",
    "ora": "^4.0.3",
    "shelljs": "^0.8.3",
    "yargs": "^15.1.0"
  }
}

command.js一定要以#!/usr/bin/env node开头,才能正常执行

本地调试

npm link

发布包

npm publish

注意: 切换到npm镜像

遇到git clone速度慢解决方案

在网站 https://www.ipaddress.com/ 解析地址 github.global.ssl.fastly.net github.com

Windows上的hosts文件路径在C:\Windows\System32\drivers\etc\hosts Mac/Linux的hosts文件路径在:sudo vim /etc/hosts

Vim /etc/hosts #此处应该是你本地解析出来的地址 199.232.5.??? github.global.ssl.fastly.net 192.30.253.??? github.com

刷线dns即可 Windows刷新dns: ipconfig /flushdns Linux刷新dns: systemctl restart nscd 或者 /etc/init.d/nscd restart Mac刷新dns: [最新的 OS X Mountain Lion or Lion 上刷新DNS] sudo killall -HUP mDNSResponder [较新的苹果Mac OS X系统刷新DNS] type dscacheutil -flushcache [比较老的刷新DNS] lookupd -flushcache