Skip to content

Minimalistic create-react-app in TypeScript based on UI lib with Storybook and Storyshots in Lerna monorepo

License

Notifications You must be signed in to change notification settings

softspiders/cra-ts-uilib-storybook-storyshots-lerna

Repository files navigation

SOFTSPIDERS

cra-ts-uilib-storybook-storyshots-lerna

UNDER DEVELOPMENT

CRA and Lerna do not support each other yet, so for now we are waiting with hope.

Minimalistic template for Create-React-App in TypeScript based on UI lib with Storybook and Storyshots in Lerna monorepo

Feature tags

  • jest
  • lerna
  • react
  • starter
  • storybook
  • storyshot
  • template
  • typescript
  • ui

Direct ancestors (also by code)


Requirements


Install

It is worth noting that in order to unify the settings of environment variables, you must have the cross-env package previously installed. See usage in cra-app package.json test script.

Bootstrap

To install all packages dependencies, being in the root directory, run

npm run bootstrap

Run

Start

npm run start

Run Storybook

npm run storybook

Test

To run tests of all packages, being in the root directory, run

npm run test

Test ui library

npm run test:lib

Update storyshots

When testing the user interface library shows storyshot errors (the difference between the new and old storyshots), you can update the old one with the command

npm run update:storyshots

Build uilib bundle

Bundle of uilib library can be obtained executing the command

npm run build:lib

The resulting package is located in the packages/uilib/public/index.js file.

Clean

To clear node_modules in all packages, being in the root directory, run

npm run clean

Authors

Alexander Lapygin

License

Licensed under the MIT license.