Skip to content

fix: clean up v2 templates list#78

Open
nerdchanii wants to merge 1 commit into
solidjs-community:mainfrom
nerdchanii:main
Open

fix: clean up v2 templates list#78
nerdchanii wants to merge 1 commit into
solidjs-community:mainfrom
nerdchanii:main

Conversation

@nerdchanii

Copy link
Copy Markdown

Purpose

This PR cleans up the v2 templates list to align with the solidjs/templates repository.

Context

The template list is currently hardcoded in constants.ts.
but templates are fetched from the solidjs/templates repo.

This mismatch can cause issues when templates are added/removed in the templates repo but not reflected here.

Ref: solidjs/templates

Changes

  • Removed non-v2 templates (hackernews, notes, v1 with-solidbase)
  • Sorted the template list alphabetically for better maintainability

Before/After

  • hackernews
  • notes
  • with-solidbase (v1 version)

Sorted order:
with-authwith-authjswith-drizzlewith-mdxwith-prismawith-solid-styledwith-solidbasewith-strict-cspwith-tailwindcss
with-tanstack-routerwith-trpcwith-unocsswith-vitest

Files Changed

  • packages/create/src/utils/constants.ts

Appendix: Future Automation Ideas

To keep the template list in sync with solidjs/templates, we could consider:

  1. GitHub Actions Approach:
    • Set up a workflow that watches solidjs/templates repo changes
    • Automatically updates constants.ts when v2 templates are added/removed
    • Creates a PR for review
  2. Runtime Computation:
    • Use GitHub API to fetch available templates dynamically
    • Cache the result to avoid API rate limits
    • Fallback to hardcoded list if API fails
      Both approaches would eliminate manual maintenance and prevent sync issues. Thoughts?

p.s. Thank you for your efforts and for maintaining this project.

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