@goodshuffle/gspro-wc

中文文档
0.5.11发布于 2025/04/09UNLICENSEDTypeScriptESM + CJS近 30 天下载 8374

The Goodshuffle web components library.

原始使用文档
文档目录5 节
  1. Getting Started
  2. Dependencies
  3. Development
  4. Sample Data
  5. Release

Getting Started

Use these webcomponents to make your Goodshuffle inventory available on a website.

Dependencies

You will need a recent installation of an LTS version of Node.js (12.18.3).

On MacOS X, you can install this using brew.

brew install node

If you anticipate working on multiple projects that use Node.js it may be helpful to install nodenv.

Anyone familiar with sdkman, rbenv, or pyenv should feel right at home. Other solutions for managing multiple versions of Node.js can be used, but nodenv is recommended.

Development

After cloning the project, run the following command to install project dependencies.

npm install

Run a local server.

npm run start

After running this command, your system's default browser should be opened and the content of ./src/index.html displayed. This page is used to do some live exerimentation during development. If a valid data source is not available, you will see the message "Categories temporarily unavailable."

Sample Data

By default, the project will reference a locally running version of an HTTP service that provides wishlist data. Typically, that project will be configured to reference remote deployments services (RabbitMQ, Elasticsearch, and PostgreSQL). Please see https://github.com/goodshuffle/gspro-data-api/blob/master/README.md for more info.

You may also change ./src/index.html to reference a test, demo, or even production URL for data if you do not wish to configure the wishlist HTTP services. Look for the following tag, and set the content like such. Just be aware that if you're doing local development that you should be referencing an http (not https) URL.

  <meta name="gspro-config"
        content="https://test.goodshuffle.com/vendor/:public-website-key:" />

Release

Before releasing a new version of the library, you should stop your local development server. This should prevent potential development build artifacts from appearing in production builds.

This project uses Semantic Versioning 2.0.0

Update the release version in:

  • ./package.json
  • ./src/version.ts

Note: once the release is finalized, you will need to update several other places with the new version:

  • goodshuffle-developer-site - update the changelog, update all references to previous versions in setup instructions
  • wp-gspro-gallery - update the version of the plugin that npm is using to construct the wishlist gallery

Next, run the build.

npm run build

Finally, you can publish the new version to NPM. Please be aware that you may need to run npm login if you haven't already.

npm publish

You will need an NPM account and be authorized to publish projects to the @goodshuffle organization. Two factor authentication is required to publish changes to the project.

We suggest that wishlist customers use UNPKG to retrieve the library. This is a reliable and high-performance CDN that makes it trivial to include the library on websites. At the time of writing, UNPKG provided approximately 88 billion downloads in the previous month. Please refer to the documentation to understand how ambiguous versions (e.g. 2.0) are resolved to the latest matching version.

版本与发布记录

@goodshuffle/gspro-wc 共发布 123 个版本,首次发布于 2019/10/15;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.5.11latest2025/04/091.6 年前
0.5.102025/03/141.7 年前
0.5.92024/10/192 年前
0.5.82024/10/022 年前
0.5.72024/06/182 年前
0.5.7-RC.12024/06/142 年前

关于 @goodshuffle/gspro-wc 的常见问题

@goodshuffle/gspro-wc 是什么?

The Goodshuffle web components library.

如何安装 @goodshuffle/gspro-wc?

在项目目录运行 npm install @goodshuffle/gspro-wc,或使用 pnpm add / yarn add / bun add。

@goodshuffle/gspro-wc 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@goodshuffle/gspro-wc 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@goodshuffle/gspro-wc 可以商用吗?

@goodshuffle/gspro-wc 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@goodshuffle/gspro-wc 的下载量有多少?

根据 npm 官方下载统计,@goodshuffle/gspro-wc 在 2026/10/17 – 2026/11/15 这 30 天内被下载 8,374 次,日均约 279 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@goodshuffle/gspro-wc 还在维护吗?

最新版本 0.5.11 发布于 2025/04/09(1.6 年前);至今共发布 123 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/10/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。