1.6.4 • Published 2 years ago

litmus-ui v1.6.4

Weekly downloads
247
License
Apache-2.0
Repository
github
Last release
2 years ago

Litmus UI

React component library for faster and easier web development. Build your own design system, or start with Litmus UI.

Table of Contents

  1. Project Structure
  2. Available Scripts
  3. Tech Stack
  4. Contribution Guidelines
  5. Adding a Component
  6. Branch
  7. Publishing your Library on NPM

1. Project Structure

├── .storybook
|   ├── main.js
├── coverage
├── dist
├── mocks
|   ├── styleMock.js
├── node_modules
├── scripts
|   ├── postBuild.js
├── src
│   ├── core
|   |   ├── <Stable Components>
|   |   |   ├── __tests__
|   |   |   ├── <components>.stories.tsx
|   |   |   ├── index.ts
|   |   |   ├── <components>.tsx
|   |   |   ├── styles.tsx
|   |   ├── index.ts
│   ├── labs
|   |   ├── <UnStable Components>
|   |   |   ├── __tests__
|   |   |   ├── <components>.stories.tsx
|   |   |   ├── index.ts
|   |   |   ├── <components>.tsx
|   |   |   ├── styles.tsx
|   |   ├── index.ts
|   ├── index.ts
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .prettierrc.js
├── jest.config.js
├── LICENSE
├── package.json
├── package.lock.json
├── README.md
├── CONTRIBUTION.md
├── rollup.config.js
├── stylelint.config.js
├── tsconfig.json
├── yarn.lock

2. Available Scripts

ScriptDescription
devStart the development storybook server with hot module reloading.
formatFormat your code with Prettier
format:checkFormats only the changed code with Prettier.
cleanSafely remove files and folders on all platforms directories.
testRun your Jest tests once.
test:watchRun your Jest tests in watch mode.
test:coverageRun your Jest tests and check for code coverage.
lintLint both your code and style with ESLint.
lint:scriptLint only your code with ESLint.
lint:watchLint your code with ESLint in watch mode.
lint:styleLint your css with ESLint.
storybookStart the storybook server.
buildCompile your application and make it ready for deployment

3. Tech Stack

Litmus UI is built using the following:

  • Typescript
  • Rollup
  • Prettier
  • ESLint
  • StyleLint
  • Storybook
  • Husky
  • Material UI
  • Jest
  • React Testing Library

4. Contribution Guidelines

Check our official contribution guidelines

5. Adding a new component

  • add the new component directory in the src/labs directory following this folder structure
├── MyComponent
|   ├── index.ts
|   ├── styles.ts
|   ├── MyComponent.tsx
|   ├── MyComponent.stories.tsx
|   ├── __tests__
|   |   ├── MyComponent.test.tsx

Once you have created your new component make sure you have exported it in the src/labs/index.ts file. Doing so allows the component to be compiled into the final bundle using rollup.

// src/labs/index.ts
export * from './MyComponent';
export * from './SomeOtherComponent';

You can develope your new component using storybook as your playground. Once you have added the .stories.tsx file for you new component, you can run yarn storybook to start the service.

6. Branch

dev - This branch is for incomplete unstable components, accepting and reviewing PRs for the same.

next - This branch is for components which are complete but don't have all the required specification (tests, stories, etc) shifted from dev

master - This branch is for stable components shifted from next

7. Publishing your Library on NPM

Once you have created an account on NPM you will be able to publish your library using these commands

$ yarn build
$ cd dist
$ npm pack
$ npm publish

Note: You will have to manually bump your versions in the package.json file.

Note: You will need to update the package.json name property with the name your library will be using on npm.

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1-beta.2

3 years ago

1.6.1

3 years ago

1.6.1-beta.1

3 years ago

1.6.0

3 years ago

1.5.1

3 years ago

1.6.0-alpha.0

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.3.2

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.3

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago