Everchron Shards
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
| Command | Description |
|---|---|
npm install | Install the dependencies |
npm run dev | Compiles and hot-reloads for app development |
npm run build | Compiles, minifies, and builds package |
npm run test | Run Unit Tests with Vitest |
npm publish --access public | Publishes 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 beta | Published built package to npm with a feature/branch tag |
npm run check-icons | Process 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.
- Log in (opens the browser to complete authentication):
npm login - Verify you're authenticated:
npm whoami - Confirm you have publish rights (your username should be listed as
read-write):npm access list collaborators @everchron/ec-shards - 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.
Recommended IDE Setup
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.
| Command | Description |
|---|---|
npm run storybook | Compile stories and run Storybook locally |
npm run build-storybook | Build 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