@everchron/ec-shards
v9.15.6
Published
Everchron Shards UI Library
Downloads
4,239
Readme
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.
You will need the following software to setup the development environment. The titles under "Software" in the grid below are linked to the procedures you need to follow.
| Software | Install (macOS) | Install (Linux) | Install (Windows) | |------------------------------------------------------|-------------------------------|-------------------------------|-------------------------------| Node | Follow Site Instructions | Follow Site Instructions | N/A |
Expected node version: >= 20.5.0
Project setup
| 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. 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 |
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