Skip to content

refactor: 重构 create rsmax - #1

Merged
watsonhaw5566 merged 2 commits into
masterfrom
refactor_render
Jul 30, 2026
Merged

watsonhaw5566 merged 2 commits into
masterfrom
refactor_render

Conversation

@watsonhaw5566

@watsonhaw5566 watsonhaw5566 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a new project template with WeChat mini-program configuration, light/dark theme support, and a theme-toggle demo page.
    • Added standard development, build, and cleanup scripts to generated projects.
  • Improvements
    • Simplified project creation with clearer help, version, and missing-directory handling.
    • Updated generated projects with streamlined build instructions.
    • Node.js 20 or later is now supported.
  • Documentation
    • Added setup, development, build, preview, and project-structure guidance for the new template.
  • Breaking Changes
    • Previous JavaScript and TypeScript templates and their platform-specific documentation are no longer included.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 094aca3e-1f63-4d6b-bc81-f17fb4cb60e1

📥 Commits

Reviewing files that changed from the base of the PR and between 9988e85 and 429b1c8.

⛔ Files ignored due to path filters (4)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • templates/js/template/public/icon.png is excluded by !**/*.png
  • templates/template/public/icon.png is excluded by !**/*.png
  • templates/ts/template/public/icon.png is excluded by !**/*.png
📒 Files selected for processing (41)
  • .github/workflows/ci.yml
  • .gitignore
  • package.json
  • src/config.ts
  • src/index.ts
  • src/render.ts
  • templates/README.md
  • templates/js/README.md
  • templates/js/template/.gitignore
  • templates/js/template/README.md
  • templates/js/template/app.json
  • templates/js/template/mini.project.json
  • templates/js/template/package.json
  • templates/js/template/project.config.json
  • templates/js/template/src/app.config.js
  • templates/js/template/src/app.css
  • templates/js/template/src/app.js
  • templates/js/template/src/pages/index/index.css
  • templates/js/template/src/pages/index/index.js
  • templates/template/.gitignore
  • templates/template/README.md
  • templates/template/package.json
  • templates/template/project.config.json
  • templates/template/src/app.js
  • templates/template/src/app.json
  • templates/template/src/pages/index/index.jsx
  • templates/template/src/pages/index/index.module.css
  • templates/template/src/theme.json
  • templates/ts/README.md
  • templates/ts/template/.gitignore
  • templates/ts/template/README.md
  • templates/ts/template/app.json
  • templates/ts/template/mini.project.json
  • templates/ts/template/package.json
  • templates/ts/template/project.config.json
  • templates/ts/template/src/app.config.ts
  • templates/ts/template/src/app.css
  • templates/ts/template/src/pages/index/index.css
  • templates/ts/template/src/pages/index/index.tsx
  • templates/ts/template/tsconfig.json
  • templates/ts/template/typings/index.d.ts

📝 Walkthrough

Walkthrough

The CLI now uses cac, removes platform selection, and renders a unified template scaffold. New generated-project configuration, theming, documentation, and page assets are added, while CI uses a matrix job and frozen pnpm installs.

Changes

CLI and template scaffold

Layer / File(s) Summary
CLI generation flow
src/config.ts, package.json, src/index.ts, src/render.ts
CLI parsing, options, render arguments, prompts, package dependencies, and generation messaging are updated for the simplified flow.
Generated template scaffold
.gitignore, templates/template/*, templates/js/template/src/app.css
A generic mini-program template with package metadata, configuration, theme tokens, dark-mode UI, styles, and local artifact ignores is added.
CI matrix validation
.github/workflows/ci.yml, package.json
The build test runs through a node-ci OS matrix using pnpm install --frozen-lockfile and the unified test-build script.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant CLI as create-rsmax CLI
  participant Renderer
  participant Template as templates/template
  participant Project as Generated project
  Developer->>CLI: provide project directory
  CLI->>Renderer: pass projectDirectory and check
  Renderer->>Template: load scaffold files
  Template-->>Renderer: return template contents
  Renderer->>Project: generate project files
  Project-->>Developer: display install and build commands
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor_render

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@watsonhaw5566
watsonhaw5566 merged commit a8565cb into master Jul 30, 2026
1 check passed
@watsonhaw5566
watsonhaw5566 deleted the refactor_render branch July 30, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant