0.2.9 • Published 4 years ago

@aurora-io/design-system v0.2.9

Weekly downloads
13
License
MIT
Repository
-
Last release
4 years ago

Aurora Design System

npm.io

See Storybook for more information.

How to run Aurora Design System Storybook locally:

npm i
npm run storybook

How to use Aurora Design System in your project:

  1. Most of the components and patterns described in this Storybook require that your project has version 4 of Material UI as a dependency:
npm install @material-ui/core@">=4.9.5 <5.0.0"

Depending on the components you wish to use in your project, you may also need to install supplementary Material UI packages. For example:

npm install @material-ui/icons
  1. Add @aurora-io/design-system to your project as a dependency:
npm install @aurora-io/design-system
  1. Choose an exported theme and inject it via the MuiThemeProvider:
import React from 'react';
import { auroraTheme } from "@aurora-io/design-system";
// import { daisyTheme } from "@aurora-io/design-system";
import { ThemeProvider } from "@material-ui/core/ThemeProvider";
import Button from '@material-ui/core/Button';

function App() {
  return (
    <MuiThemeProvider theme={auroraTheme}>
      <Button>This Button Is Aurora Themed</Button>
      // The rest of my app lives here
      ...
    </MuiThemeProvider>
  );
}

See the Storybook for more examples of component usage.

Tooling / Build setup

This project is based on the Create React App Typescript template with Storybook applied using it's @storybook/preset-create-react-app preset to leverage CRA's Webpack HMR setup for a good dev experience.

Builds for publishing to NPM are taken care of with TSDX. While that project has bootstrapping functionality, here just it's Rollup based build setup is used, as it's bootstrapped version of storybook doesn't provide live reload or HMR currently.

Note in package.json all dependencies are currently declared under devDependencies and peerDependencies. The majority of project is currently concerned with theming Material UI, and declaring that as a peer dependency allows more flexibility with versioning in host projects and keeps bundle size down.

Testing

Generate a local copy of the updated design-system package and install this to the project you want to test the changes in. For example:

npm run build && npm pack
cd ../whatever-host-project
npm i ~/wherever/design-system/design-system-x.x.x.tgz

Releasing

Gitlab builds and publishes a new version of the package to NPM when a release is created in the Releases UI (which makes tags in the Git repo).

Tags should follow the format v<major>.<minor>.<patch> eg v0.2.5.

Tags don't belong to any particular branch, so only create them when merge requests have been accepted and the current master is ready to be deployed.

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.12

4 years ago

0.1.10

4 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago