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

pming-cli

v0.2.1

Published

pming-cli前端脚手架

Downloads

4

Readme

pm-cli

品茗前端脚手架

包含功能

  • 注入全局pm-cli
  • 提示安装指定模板
  • 修改package.json属性
  • 更多功能还在扩展中...

node 赋予了JavaScript更强大的功能,我相信我能用他做出更多的事情,Node随记

generator

各个功能的模板,通过 generator 可以往 package.json 注入依赖字段,或者添加文件到项目中

bin.js

#!/usr/bin/env node 
# 这一行是必须加的,就是让系统动态的去PATH目录中查找node来执行你的脚本文件

npm link

命令行执行 npm link ,创建软链接至全局,这样我们就可以全局使用pm-cli命令了

插件介绍

commander

node的命令行解析最常用的就是commander库,来简化复杂cli参数操作

mkdirp

process.cwd()获取工作区目录,和用户传入项目名称拼接起来, (创建文件夹我们使用mkdirp包,可以避免我们一级一级的创建目录)

inquirer

跟用户交互

chalk

chalk 包的作用是修改控制台中字符串的样式,包括: 体样式(加粗、隐藏等),字体颜色 ,背景颜色

ora

这是一个好看的加载,就是你下载的时候会有个转圈圈的那种效果,基本效果如下

const ora = require('ora')
let spinner = ora('downloading template ...')
spinner.start()

download-git-repo

拉取git项目,我们作为拉取模板