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

create-lotus-ui

v1.0.9

Published

`pnpm init create-lotus-ui` 实际是 `npx create-lotus-ui`, npx 直接安装并运行

Downloads

2

Readme

使用说明

介绍

pnpm init create-lotus-ui 实际是 npx create-lotus-ui, npx 直接安装并运行

1、当执行create-lotus-ui时,会执行package.json下的bin 对应的路径,因此把main 改成bin

2、处理用户输入参数的插件有很多,比如 CAC,Yargs,Commander.js,command-line-args 等, command-line-args 使用起来是最简单的,所以这里使用 command-line-args 进行用户参数解析,也就是识别命令。

pnpm add command-line-args

3、command-line-usage 插件让它为我们提供帮助命令

pnpm add command-line-usage

4、交互式命令 比如让用户做选项 pnpm add prompts

5、拉取远程仓库模版 download-git-repo 工具拉去远程仓库;loading插件-ora;log 颜色插件-chalk pnpm add download-git-repo ora chalk

问题:使用download-git-repo拉去远程代码,报错:Error: 'git checkout' failed with status 1

  • 原因:没有找到master分支,使用的是main
  • 解决:地址上加#main

6、发布脚手架 使用 release-it 自动发布工具

  • 配置 本目录下配置参考:https://github.com/release-it/release-it/blob/main/docs/recipes/monorepo.md

monorepo根目录配置参考:https://github.com/release-it/release-it/blob/main/docs/recipes/monorepo.md

  • 问题:改了版本号,但是报错了如下
ERROR npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:^

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yiqian/.npm/_logs/2024-01-23T08_23_26_944Z-debug-0.log

 ELIFECYCLE  Command failed with exit code 1.

解决:因为使用了pnpm,workspace配置文件在pnpm-workspace.yaml,package.json中的workspace冲突了,删掉即可