0.0.1 • Published 6 years ago

react-material-component-library v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

React Material Component Library

A React component library for Material Components Web

Build Status Maintainability Test Coverage codecov

Creation guidelines

A few guidelines I'll be following while building this. The purpose of this guideline is to provide an accurate representation of the project and its architecture.

The goal of these guidelines is to provide a discretionary path, as well as to adequately document the moving parts so that if I need to exchange one piece for another, its consequences are readily known as to what functionality I will need to replace or lose altogether. All moving parts are easily exchangeable for other alternatives. The idea then is to be completely decoupled from everything other than the original scope of the library, which is Material Design and its componentized child, Material Components Web.

Architecture

  • lerna (whether this becomes a mono-repo or not)
    • manage multiple packages within a single repo
    • uniform and independent releases across multiple packages
    • single command for upping semver, running release, and publishing to npm
  • lerna-changelog (for those extra fancy release logs)
    • uses Github issue and PR labels
    • displays a list of all PRs merged for a tag range on each tagged release
  • must not use Webpack or Rollup (subject to change)
    • In the past, these have slowed to a screeching halt when building
      • sometimes taking upwards of 2-5 minutes to build
    • TypeScript has its own internal build process for JavaScript output types
    • subject to change if we absolutely need this resource
  • may use Babel if necessary
    • for experiemental ES syntax, etc.

Branches

  • master (production)
  • develop (staging)
  • epic
    • feature/my-feature 2
    • fix/rfc-2616-headers 1
    • docs/component-readme 2
    • style/round-button-corners (pertaining to UI only) 2
    • refactor/var-to-const 1
    • test/component 2
    • chore/scss-compile-script 2

Testing

  • Jest
    • snapshot tests
    • TDD
    • BDD
  • Enzyme
    • enzyme-adapter-react-16
    • DOM tree
    • component constructor testing
  • Cypress
    • e2e

Build

  • first-class TypeScript
  • es-module
  • commonjs
  • umd

Style (UI)

  • can only be styled with material-components-web's internal SCSS
  • can be styled with a theming engine (TODO)
  • must be styled purely with CSS where required (components not belonging to MWC)
    • SCSS and Stylus variables become obsolete with modularity
    • components should be atomic (their most basic forms)

Component