Skip to content

refactor(create-rslib): use extraTools to generate templates#1462

Merged
Timeless0911 merged 4 commits intomainfrom
refactor/create-rslib-templates
Jan 30, 2026
Merged

refactor(create-rslib): use extraTools to generate templates#1462
Timeless0911 merged 4 commits intomainfrom
refactor/create-rslib-templates

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Jan 29, 2026

Summary

Refactor create-rslib to use extraTools to generate templates as well as simplify the template generation logic. This flattening of structure improves maintainability and visibility of templates.

image

docs will be updated before release

Related Links

N/A

Checklist

  • Tests updated.
  • Documentation updated (not required).

Copilot AI review requested due to automatic review settings January 29, 2026 13:06
@Timeless0911 Timeless0911 changed the title refactor(create-rslib): restructure templates and simplify generation logic refactor(create-rslib): use extraTools to generate templates Jan 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors create-rslib to simplify template management by moving from a fragment-based generation approach to direct template directories, improving maintainability and visibility of templates.

Changes:

  • Restructured templates from fragments/ to flat template-* directories (e.g., template-vue-ts, template-vitest/vue-ts)
  • Simplified template generation logic by removing the helpers.ts and genTemplates.ts files and their complex composition logic
  • Updated tests to work with the new flat template structure and added Vue template test coverage

Reviewed changes

Copilot reviewed 30 out of 143 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/create-rslib/src/index.ts Refactored to use direct template names and extraTools pattern; removed complex template composition logic
packages/create-rslib/src/helpers.ts Deleted - template generation logic no longer needed
packages/create-rslib/src/genTemplates.ts Deleted - templates are now static, not generated
packages/create-rslib/test/index.test.ts Updated to use new template structure; added Vue test suite
packages/create-rslib/test/helper.ts Updated validation logic for Vue TS templates and improved storybook dependency checks
packages/create-rslib/rslib.config.ts Removed template generation hook
packages/create-rslib/package.json Removed generate-templates script
packages/create-rslib/template-* New flat template directories for all base and tool combinations
packages/create-rslib/template-vitest/vue-ts/vitest.config.ts Fixed setup file reference from .js to .ts
.gitignore Updated to track template directories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Timeless0911 Timeless0911 marked this pull request as draft January 29, 2026 14:10
@Timeless0911 Timeless0911 marked this pull request as ready for review January 30, 2026 09:57
@Timeless0911 Timeless0911 merged commit 7923896 into main Jan 30, 2026
11 checks passed
@Timeless0911 Timeless0911 deleted the refactor/create-rslib-templates branch January 30, 2026 09:59
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.

2 participants