refactor(create-rslib): use extraTools to generate templates#1462
Merged
Timeless0911 merged 4 commits intomainfrom Jan 30, 2026
Merged
refactor(create-rslib): use extraTools to generate templates#1462Timeless0911 merged 4 commits intomainfrom
extraTools to generate templates#1462Timeless0911 merged 4 commits intomainfrom
Conversation
extraTools to generate templates
Contributor
There was a problem hiding this comment.
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 flattemplate-*directories (e.g.,template-vue-ts,template-vitest/vue-ts) - Simplified template generation logic by removing the
helpers.tsandgenTemplates.tsfiles 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor
create-rslibto useextraToolsto generate templates as well as simplify the template generation logic. This flattening of structure improves maintainability and visibility of templates.Related Links
N/A
Checklist