How jd-opensource/taro-ui works
Project type and purpose
• This is a monorepo for “Taro UI,” a multi-platform UI component library built on the Taro framework.
• It provides:
• Core component source (packages/taro-ui/src)
• Platform-specific builds (packages/taro-ui/rn for React Native)
• Demo applications (packages/taro-ui-demo, packages/taro-ui-demo-rn, examples/)
• Documentation site (packages/taro-ui-docs)
• The README confirms it’s an open-source, multi-target UI toolkit, not a typical full-stack app.
File structure
• Top-level: configuration files (.eslintrc, babel.config.json, CI workflows), examples, and a PNPM workspace descriptor.
• “packages/” contains four main packages:
• taro-ui: the core library (TypeScript source + rollup configs + tests)
• taro-ui/rn: React Native flavor of the core
• taro-ui-demo: H5/Mini-app demo
• taro-ui-demo-rn: RN demo
• taro-ui-docs: documentation site built with webpack
• “examples/” holds minimal sample projects illustrating usage (one for Sass version, one for lazy-load component).
• Build/CI scripts: rollup configs, webpack configs in docs, GitHub Actions and Travis workflows for test/build/publish.
README for additional insights
• Confirms multi-end support: WeChat/Alipay/Baidu mini-apps, H5, React Native.
• Mentions Taro’s compile-to-multiple-targets pipeline.
• Points to separate docs site and official demos.
Detail
• Package as a separate node.
• How shared configs (.eslintrc, babel.config.json) flow into each package build.
• Test runner stage for the core package.
• Multi-platform compile targets.