Skip to content

Latest commit

 

History

History
97 lines (63 loc) · 1.29 KB

README.md

File metadata and controls

97 lines (63 loc) · 1.29 KB

snapkit

Usage

Install from Github Tag

yarn add snapkit@git+ssh://[email protected]:KeystoneHQ/snapkit#[tagName]

example:
yarn add snapkit@git+ssh://[email protected]:KeystoneHQ/snapkit#v0.1.5

Import CSS

import 'snapkit/dist/style.css'

Import Component

import { Tabs, Tab } from 'snapkit'

Document

There is no document open to the public, you need to use storybook to build it yourself.

Development

Install

yarn install

Start

yarn run dev

Build Components and Documents

yarn run build

Build Document

yarn run build:storybook

Use package in localhost proejct dependency

Install a local package manager

npm i yalc -g

Publish package

publish snapkit package
Execute in the project directory:

npm run publish:local

Add dependency to the project

yalc add snapkit --link

Publish update components to the local package manager

npm run publish:local

Publish to Github tag

changed package.json version
tip: only master branch publish:git

npm run publish:git

Development specification

  1. The storybook file is named as "xxx.stories.tsx";
  2. The css module is named as "xxx.module.scss";