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-zy-web-info

v1.0.2

Published

web资料

Downloads

2

Readme

📖 介绍

create-zy-web-info 是一个用于快速创建前端启动模板项目的轻量脚手架工具,它可以帮助你快速搭建练习题联机小游戏的前端启动模板项目

使用 NPM 包

pnpm create zy-web-info@latest # 使用最新的包
pnpm create zy-web-info <项目名称> # 快速完成项目名称
pnpm create zy-web-info -t <模板名> # 快速完成模板名
pnpm create zy-web-info <项目名称> -t <模板名> # 快速创建项目, 不需要再问题交互

建议添加上标记名(@latest),否则可能会解析到缓存的过时软件包版本。

create zy-web-info 支持 -t 参数选择模板,目前只有 2 个模板,分别是练习题 interview 和黄金捕手联机小游戏 game

🚀 开发

node 调试

pnpm i # 安装依赖, 如果安装依赖失败, 将.mpmrc 文件的 registry=https://registry.npmjs.org/ 这行代码注释
pnpm build # 得到 dist/outfile.cjs 文件
pnpm dev # 执行 node dist/outfile.cjs, 可以直接在命令后加参数进行调试
# 或
pnpm dev <项目名称> # 快速完成项目名称
pnpm dev -t <模板名> # 快速完成模板名
pnpm dev <项目名称> -t <模板名> # 快速创建项目, 不需要再问题交互

link 调试

  • pnpm build,得到 dist/outfile.cjs
  • 在控制台中执行 npm link,就能在本地执行 bin 中设定的指令了
  • 查看全局软连 npm ls -g
  • 删除本项目的软连 npm un create-zy-web-info -g
pnpm i
pnpm build
npm link
create-zy-web-info
# create-zy-web-info my-project
# create-zy-web-info xx -t game

版本号和标签增加

  • 执行 pnpm release, 增加版本号, 打版本标签, 例如 v1.0.0 ➡️ v1.0.1
  • 该命令会触发 bumpp, 进行交互式版本号增加

代码提交指南

为了规范代码提交流程,请遵循以下步骤:

激活 Git 钩子

首次提交代码前,请确保执行以下命令之一来激活 Git 钩子:

  • npx simple-git-hooks
  • pnpm sgh

Git 钩子功能说明

  • pre-commit:

    • 触发脚本: pnpm lint-staged
    • 功能: 在提交前针对暂存的文件运行 linter。
  • commit-msg:

    • 触发脚本: pnpm dlx commitlint --edit $1
    • 功能: 检查最近一次的 Git 提交信息是否符合规范。

发布

# 登录,首次会自动注册
npm login

# 发布
npm publish --access=public