Repository navigation
fix(init): rename the display name of the template - #117
Merged
Merged
Conversation
The init job looked only for FullstackTemplate in any case. It missed the spaced title "Fullstack Template", the kebab form "fullstack-template", and the sidebar, which splits the name over two elements. This check fails until the init script renames them.
…plate An app made with --name Fleet showed "Fullstack Template" in the browser tab and "FS Fullstack Template" in the sidebar, because the script renamed only FullstackTemplate and fullstacktemplate. The script now has a --display-name option. Its default is the --name value. It replaces "Fullstack Template" with the display name, and "fullstack-template" with the name in kebab case, for example acme-shop. The sidebar shows the display name in one string and takes its initials from it, so that the rename reaches it. Closes #91
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.
Why
scripts/init.csrenamedFullstackTemplateandfullstacktemplate, but not the display name "Fullstack Template". So an app made with--name Fleetshowed "Fullstack Template" in the browser tab, and "FS Fullstack / Template" in the sidebar. The kebab-case namefullstack-templatealso stayed, in the name of the verify skill and in the Authentik blueprint.Closes #91
What changed
init.cshas a new--display-nameoption. Its default is the--namevalue. The script replaces "Fullstack Template" with the display name, andfullstack-templatewith the name in kebab case (Acme.Shopgivesacme-shop).--display-name.Scope
--namevalue as is.CarePointstays "CarePoint" and does not become "Care Point". The issue asks for this default, and a split by rule guesses wrong for names such asIBMPortalor a brand that is one word. To get a spaced name, use--display-name "Care Point".Blast Radius
Only a run of
init.cschanges behavior, and the template repo keeps its own name. The template sidebar now shows "FT Fullstack Template" on one line, not "FS Fullstack / Template" on two lines. One doc line now says "the pdevito3/FullstackTemplate repository", so that init keeps it pointing at the upstream repo.Verification
dotnet run scripts/init.cs --name Fleeton a fresh clone ofmainleft 10 hits of the template name, among themfrontend/index.html:7: <title>Fullstack Template</title>. After: the same grep finds nothing,pnpm buildwrites<title>Fleet</title>todist/index.html, and the sidebar shows "F Fleet".init.ymlin a fresh clone at each commit. At the test commit, the step "Fail if the template name is left or an upstream link changed" fails with those 10 hits. At the fix commit, all 9 steps pass, including the build and the unit tests of the renamed app.dotnet build FullstackTemplate.slnx,pnpm lint,pnpm test(70 passed), andpnpm test:e2e(11 passed) pass.