How mallfoundry/taroify works
Main Components
• Packages:
• Core Components (“packages/core”): This is the heart of Taroify with 70+ UI components (such as Button, Dialog, Calendar, etc.). It is further subdivided into many subfolders dedicated to individual components (e.g., button, calendar, dialog, etc.).
• Commerce Components (“packages/commerce”): These components may extend or provide specificity for commerce-related UI elements.
• CLI (“packages/cli”): Likely a command-line tool to help scaffold or manage projects built on Taroify.
• Babel Preset (“packages/babel-preset”): Contains Babel configuration presets to support compilation needs.
• Hooks (“packages/hooks”): Contains custom React hooks specifically for use within Taroify projects.
• Stylelint Config (“packages/stylelint-config”): Although simpler than the rest, it holds styling rules which affect overall code style/enforcement.
• Gulp (“packages/gulp”): Contains build scripts and tasks (for bundling, styles, testing, etc.).
• Demo and Documentation:
• Demo (“packages/demo”): A demonstration project that imports and uses the Taroify components to show them in action.
• Site (“site”): This houses the documentation (using Gatsby) where samples, changelogs, and guides are provided.
• Problems (“problems”): Likely an alternative or legacy demo/project structure for issue reproduction.
• External Configuration & Tools:
• The root-level configuration files (babel.config.js, jest.config.js, tsconfig.json, etc.) tie the tools together, while GitHub workflows and versioning files (e.g., lerna.json) facilitate monorepo management.
Relationships and Data Flow
• Monorepo (top-level) with branches or sub-nodes leading to each package.
• The CLI package may use “babel-preset” and “core” scripts to streamline development.
• There is a flow from root-level configuration files into all these packages, ensuring consistent linting, formatting, testing (via Jest), and compilation (Babel, TypeScript).
Including Technological Details
• And annotate the components with the relevant technologies:
• Taro and React (highlighting that components use Taro React)
• TypeScript (all packages are written with full TypeScript support)
• Babel (babel-preset)
• Gulp (build scripts)
• Gatsby (for the documentation “site”)
• Jest (for testing)
• Stylelint/Prettier (for styling and formatting)