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 🙏

© 2025 – Pkg Stats / Ryan Hefner

zz-shopify-components

v0.31.0

Published

Reusable Shopify components for theme projects

Readme

开发流程

本项目为开发仓库,开发公共组件代码。开发流程如下:

  • 在开发仓库main分支中拉取代码feature/xxx,开发调试完成后并到test分支。
  • 开发仓库在test分支打测试包确定版本号1.0.0-beta(限制打包分支,避免多人同时开发,代码未合并问题)。
  • 站点仓库引入公共代码库,并在站点仓库进行自测和提测。
  • 测试完成后,开发仓库test分支合并到main分支打包正式版本。
  • 站点引入正式版本的公共代码库进入预发回归测试。回归完成走线上流程。 详细参考: https://zerozero.feishu.cn/docx/WDzudI39NoY1BexSr5cci5sPnsh

开发要求

组件库中的文件必须以zz-开头, 否则不会copy到站点仓库中。如有第三方插件需要加入,可使用component.config.json白名单。

双重过滤,避免文件污染

  • .npmignore 过滤的文件不会上传到npm包中,减少包的大小。
  • 不是zz-开头的文件不会copy到站点仓库中。

打包要求

必须固定分支打包,test分支打包beta版本,比如: 0.0.1-beta.1 。main分支打包正式版本,比如: 0.0.1 。

npm发布流程

npm login # 登录
npm publish # 发布

脚本发布

  • npm run publish:patch 发正式版 patch,正式环境bug修复版本。例如 1.0.0 → 1.0.1
  • npm run publish:minor 发正式版 minor,日常迭代发布。例如 1.0.1 → 1.1.0
  • npm run publish:major 发正式版 major,重大版本迭代。例如 1.1.0 → 2.0.0
  • npm run publish:beta 发测试版,例如 1.0.1 → 1.0.2-beta.0,下一次为 1.0.2-beta.1

hotfix

拉取最新 tags

git fetch --tags

查看所有 tags

git tag

基于某个 tag 修改,创建新hotfix分支

git checkout -b hotfix/branch v2.1.3

站点仓库集成

package.json中加入依赖,加入postinstall脚本配置,执行npm install

 "scripts": {
    "postinstall": "sync-components-cli"
  },
  "dependencies": {
    "zz-shopify-components": "0.0.12" // 固定版本号
  }

注意事项:

  • 需要插入layout/theme.liquid的全局文件,需要在各站点手动插入layout/theme.liquid中。
  • 迁移组件时候,注意组件依赖的一些插件/全局的依赖函数是否有迁移。
  • 迁移组件时候,注意旧组件在各个站点可能以及不同,需要注意兼容性。(可通过增加shopify配置来兼容不同站点的特殊处理)