@everchron/ec-shards

中文文档
22.3.0发布于 2026/11/13MITESM + CJS近 30 天下载 4011

Everchron Shards UI Library

原始使用文档
文档目录9 节
  1. Using Shards
  2. Building Shards
  3. Project Commands
  4. Logging into npm via CLI
  5. Recommended IDE Setup
  6. Customize configuration
  7. Storybook
  8. Design Tokens
  9. Running Tests

Everchron Shards

Unit Tests

Using Shards

To use ec-shards in your project, install the NPM package and make sure to always use the latest stable version.

yarn add @everchron/ec-shards

Building Shards

This repository contains the design system and Vue components for the Everchron web application.

To set up the development environment, you will need Node.js installed on your system. Please follow the instructions on the Node Version Manager (nvm) site for your platform (macOS or Linux).

Expected node version: >= 24.13.0

Project Commands

CommandDescription
npm installInstall the dependencies
npm run devCompiles and hot-reloads for app development
npm run buildCompiles, minifies, and builds package
npm run testRun Unit Tests with Vitest
npm publish --access publicPublishes built package to npm (main branch). Note: You must be logged into npm with an account that has access to the @everchron organization. Details below. Additionally, you need to bump the version number in package.json before publishing.
npm publish --access public --tag betaPublished built package to npm with a feature/branch tag
npm run check-iconsProcess all icons in the src/assets/icons directory (removes hardcoded colors and adds vector-effect="non-scaling-stroke")

Logging into npm via CLI

Being logged into npmjs.com in your browser does not authenticate the npm CLI. If npm publish fails with a 404 Not Found (or npm whoami returns 401 Unauthorized), your CLI session is missing or expired.

  1. Log in (opens the browser to complete authentication):
    npm login
    
  2. Verify you're authenticated:
    npm whoami
    
  3. Confirm you have publish rights (your username should be listed as read-write):
    npm access list collaborators @everchron/ec-shards
    
  4. Publish (add --otp=<code> if your account uses 2FA):
    npm publish --access public
    

CLI login sessions expire, so you may need to run npm login again before future publishes. If npm whoami succeeds but publishing still returns 404, ask an @everchron org owner to grant you write access.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Customize configuration

See Vite Configuration Reference.

Storybook

Storybook provides a sandbox to build UI components in isolation. You can view Storybook hosted on Github pages here.

To view Storybook visit http://localhost:6006/ in your browser.

CommandDescription
npm run storybookCompile stories and run Storybook locally
npm run build-storybookBuild a static version of Storybook, hosted on Github pages

Design Tokens

The shards design system runs on design tokens, a system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them. Tokens are defined in src/tokens/src/tokenfile.json and built into src/tokens/build/platform/file.x.

Command to rebuild all token files: npm run build-tokens

Running Tests

Tests are ran by Vitest. To run tests, use the following command:

npm run test

If you would like to view the testing dashboard, or run tests via the UI, use the following command:

npm run test:ui

版本与发布记录

@everchron/ec-shards 共发布 1,365 个版本,首次发布于 2021/04/20;过去 12 个月发布了 149 个版本。

版本发布日期距今
22.3.0latest2026/11/13今天
22.2.42026/11/13今天
22.2.32026/11/121 天前
22.2.22026/10/2718 天前
22.2.12026/10/2718 天前
22.2.0next2026/10/2618 天前

其他发布通道:genesis → 16.4.3,hotfix/icon-issue → 14.27.4,feat/exhibit-sticker-editor → 20.2.0,next → 22.2.0。

关于 @everchron/ec-shards 的常见问题

@everchron/ec-shards 是什么?

Everchron Shards UI Library

如何安装 @everchron/ec-shards?

在项目目录运行 npm install @everchron/ec-shards,或使用 pnpm add / yarn add / bun add。

@everchron/ec-shards 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/everchron__ec-shards 是否存在。

@everchron/ec-shards 支持 ESM 还是 CommonJS?

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

@everchron/ec-shards 可以商用吗?

@everchron/ec-shards 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@everchron/ec-shards 的下载量有多少?

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

@everchron/ec-shards 还在维护吗?

最新版本 22.3.0 发布于 2026/11/13(今天);至今共发布 1365 个版本,其中过去 12 个月发布了 149 个;首次发布于 2021/04/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。