refactor(create): extract starter templates to templates/ (#278)#366
Merged
Conversation
The entire starter project lived as inline template strings in cli.ts,
making it hard to review/edit/test. Move all starter files to
packages/create/templates/ and have buildTemplates() read them from disk,
rendering version placeholders (${v.X}) at generation time.
- templates/: .gitignore, public/openelement-mark.svg, content/blog/welcome.md,
deno.json.tmpl (stored as .tmpl so deno does not treat templates/ as a
nested workspace config; renamed to deno.json on write),
vite.config.ts, app/{components,routes,routes/api,islands}/*.
- cli.ts: TEMPLATE_FILES source->target map; inline colorTokensStyle inlined.
- deno.json: include + publish templates; packageIsland button gets type=button.
- cli.test.ts: readTemplate() reads from templates/ instead of extracting
inline strings.
Verified: deno check cli.ts + lint (7 files clean) + cli.test.ts (19, incl.
full build pipeline) green.
Closes #278
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
|
fatal: couldn't find remote ref fix/278-extract-create-templates |
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.
The entire starter project lived as inline template strings in cli.ts, making it hard to review/edit/test. Move all starter files to packages/create/templates/ and have buildTemplates() read them from disk, rendering version placeholders (${v.X}) at generation time.
Verified: deno check cli.ts + lint (7 files clean) + cli.test.ts (19, incl. full build pipeline) green.
Closes #278