Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

iFixit/core-design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

core-design is our take on a framework-agnostic design system built with stencil, a web component compiler. We had unique requirements at iFixit and Dozuki which required us to consume components in React, HTML, and PHP today, and who-knows-what tomorrow. core-design was architecturally influenced by Ionic, but adapted for desktop environments using our own internal style guidelines.

Components

  1. Web Components
  2. React Components

Packages

  1. @core-design/components-web
  2. @core-design/components-react

Getting Started

Dependencies

We opted to use lerna to help manage multiple child packages efficiently. To get yourself set up for local development, you'll need node installed to run:

# 1. Install dependencies in the root package.json
npm install

# 2. Install and link dependencies in child packages
npx lerna bootstrap

Local Development

For Stencil development, run:

# from root
npx lerna run start

# from packages/components-web
npm run start

For Storybook development, run:

# from root
npx lerna run storybook

# from packages/components-web
npm run storybook

Publishing to NPM

First time publishing?
  1. You need an NPM account with access to @core-design.
  2. You need to be logged in to npm on your terminal with:
npm login

Compile packages and publish

Before publishing to NPM we need to build child repo packages with lerna:

npx lerna run build

Then, publish to NPM:

npx lerna publish

npx lerna publish will automatically determine which packages should be published and prompt you to choose a new version. In addition to publishing, it will also add and push a commit with the changes necessary to reference the new version. See the lerna publish docs for more info.