0.1.4 β€’ Published 4 years ago

@ott_test/location-field v0.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

OTP-UI React Component Library

A Monorepo with multiple packages and a shared build, test, and release process.

  • πŸ‰ Lerna β€Š- The Monorepo manager
  • πŸ“¦ Yarn Workspacesβ€Š - β€ŠSane multi-package management
  • πŸš€ Reactβ€Š - β€ŠJavaScript library for user interfaces
  • πŸ’… styled-componentsβ€Š -β€Š CSS in JS elegance
  • πŸ›  Babelβ€Š - β€ŠCompiles next-gen JavaScript
  • πŸ“– Storybook - UI Component Environment
  • πŸƒ Jestβ€Š -β€Š Unit/Snapshot Testing

Usage

  • yarn dev - This starts Storybook for viewing all the components locally.
  • yarn bootstrap - This installs all of the packages and links dependent packages together.
  • yarn build - This babelfies all of the packages and creates /lib folders for each one.
  • yarn unit - Run jest unit tests.
  • yarn coverage - Shows jest unit coverage.

Lerna

  • lerna changed - Show which packages have changed.
  • lerna diff - Show specifically what files have cause the packages to change.
  • lerna create <packageName> - Creates new package and walks through setting up package.json

Linking

When linking inside of the Monorepo, everything works as expected. If you are trying to consume packages from this Monorepo in a different application locally, using npm link or yarn link does not work as expected. However, we have a workaround for the time being.

  1. Run yarn build
  2. Run yarn dev
  3. Change the package.json of the consumer from $YOUR_PACKAGE_NAME (which lives inside the monorepo) to file:./../monorepo/packages/$YOUR_PACKAGE_NAME
  4. Run rm -rf node_modules && yarn in the consumer
  5. πŸŽ‰

Contributing

All formatting and linting should be taken care of for you using stylelint, ESLint, and Prettier. You should also consider installing an extension for CSS syntax highlighting.