Skip to content

Latest commit

 

History

History
91 lines (76 loc) · 6.91 KB

project-documentation.md

File metadata and controls

91 lines (76 loc) · 6.91 KB

[SharedComponents] Shared Components - ReactJS shared components

CircleCI Master: CircleCI

Presentation

This project is a javascript mono-repository using lerna and yarn workspaces. All packages share:

  • a common architecture dictated by the template package
  • a common configuration and tooling (Eslint, prettier, flow, jest) that if necessary can be locally overriden or enhanced in each of the package

Take a LIVE look at the components: To do

How to use SharedComponents on my project

  1. Installation
    1. Download a package
    2. Install peer dependencies
  2. Use a SharedComponents component in my project
    1. Setup and requirements
      1. Polyfills
      2. Handle Numbro with webpack
      3. Set up the APP_ENV variable
    2. Use a component in your app [To improve]
    3. Use fonts ans icons
    4. Check your component are well used with Flow
  3. Configure your CI

How to contribute to SharedComponents

  1. ⚠️ Should I contribute to SharedComponents ? ⚠️
    1. How to decide
    2. Migration standards
    3. Development on SharedComponents is complex hence costly
  2. Getting started
    1. Prerequisite
    2. Install the project
    3. Launch Storybook
  3. Recommended environment setup
    1. VSCode Plugins
    2. Pretty Pull Request
  4. Development flow
    1. Start from a clean environment
    2. Open the project
    3. Run your feature locally
      1. On Storybook
      2. On your project, with yarn link
    4. Development guides
      1. How to make a perfect new component
      2. How to style a component and create a customizable component
      3. How to handle data fetching for widgets
      4. How to add a dependency to a SharedComponents package
      5. How to export my component flow types
      6. [ADVANCED] How to create a new package
      7. [ADVANCED] How to add a new icon to the icomoon font
      8. [ADVANCED] Optimize your package before publishing
    5. Test your changes [TODO: improve this section]
  5. SharedComponents Git flow: Share your contribution
    1. Commit message structure
    2. How to declare a breaking change
    3. Merging your code
    4. Dealing with conflicts
    5. How to amend your commit if your feature is not validated
    6. Storybook and packages publication
  6. Troubleshooting
    1. Don't panic and yarn reset
    2. Debugging Verdaccio

Technical standards

  1. Tests
  2. Architecture
  3. Development Flow
  4. 0 bug / 0 perf problem
  5. Up to date dependencies
  6. Iso-prod staging
  7. Reuse

For the Core team

  1. Debugging Verdaccio
  2. Configuring an isolated test environment
  3. Why did we decide to use aliases to make yarn link work ?
  4. Using absolute paths to import files

Legacy doc to rearrange

  1. Development
  2. Tests
  3. Best Practices / Troubleshoot / FAQ