Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3748 Add custom template option back to blitz generate command #3866

Merged
merged 25 commits into from
Oct 12, 2022

Conversation

siddhsuresh
Copy link
Member

@siddhsuresh siddhsuresh commented Sep 26, 2022

Closes: #3748

What are the changes and their implications?

  • add type BlitzServerConfig for the types used in the blitz-server.ts config
  • create a new command blitz generate custom-templates that generates the default templates present in the @blitzjs/generator to provide an easy starting point for the developer to use the custom templates feature
    • getting custom template path from the user and using that to save the templates
    • updating the app/blitz-sever file with the required changes needed to use custom templates
  • read the named export cliConfig exported from app/blitz-server.{ts|js} and use the customTemplates property to pass the custom template path

Example Usage

image

// app/blitz-server.ts
import type { BlitzServerConfig } from "blitz"

...

export const cliConfig: BlitzServerConfig = {
  customTemplates: "app/template",
}

@changeset-bot
Copy link

changeset-bot bot commented Sep 26, 2022

🦋 Changeset detected

Latest commit: 490ea3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
blitz Patch
@blitzjs/generator Patch
@blitzjs/auth Patch
@blitzjs/next Patch
@blitzjs/rpc Patch
@blitzjs/codemod Patch
@blitzjs/config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@siddhsuresh siddhsuresh changed the title Add custom template #3748 Add custom template usage back to toolkit Sep 26, 2022
@siddhsuresh siddhsuresh changed the title #3748 Add custom template usage back to toolkit #3748 Add custom template option back to blitz generate command Sep 28, 2022
@siddhsuresh siddhsuresh self-assigned this Oct 2, 2022
@beerose
Copy link
Contributor

beerose commented Oct 12, 2022

One last thing — we have to update docs for it

@itsdillon itsdillon merged commit f39ba1f into blitz-js:main Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add custom template usage back to toolkit
5 participants