c8r / kit

Tools for developing, documenting, and testing React component libraries

Home Page:https://compositor.io/kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI

johno opened this issue · comments

For more in-depth discussion around #73 and subsequent CLI PRs:

Features

  • scaffolding (with template support for libraries/tests/components/theme)
  • dev server
  • static building
  • publishing
  • design system linting
  • snapshot/render diffing
  • image publishing
  • svg publishing

Arch

The heavy lifting of the CLI should live in logical, separate packages in the packages dir. This will allow for the libraries to be used for other usecases and app contexts. The cli dir in root will server more as the UI for the CLI itself.

Thinking a little about how things could be modularized a little bit this morning and just putting down some thoughts...

  • Inputs – should accept the following file types or directory of files
    • components
    • MDX files
    • JSX files
    • configuration file
  • Outputs – can render out to the following
    • dev server
    • static build with bundle
    • published
    • local files (for scaffolding)
    • images, Figma, etc.
  • App-level components (how each file is handled; should be built with standalone kit components)
    • isolated render of the component itself, with directory listing
    • Library component with examples (card view & side bar, etc)
    • JSX live example editor (preview & textarea for editing)
    • MDX live editor
    • source code sandbox (maybe just leverage code sandbox)
    • visual diffing

For the scaffolding, was also thinking it might be good (but maybe overkill) to build setups for external libraries, like:

  • create-react-app
  • next.js
  • Gatsby
  • react-static