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

fix(playground): update template generator to support Angular standalone #3983

Merged
merged 4 commits into from
Dec 31, 2024

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Dec 30, 2024

Updates the template generator to support Angular standalone.

How to test these changes:

  1. Navigate to the ionic-docs repository

  2. Run npm run playground:new

  3. Select the following options when prompted:

    ? Is this playground for a component? › yes
    ? Which component is this playground for? › ion-button
    ? What should the playground path be? › withcss
    ? Select the Ionic Framework version for the playground › 8
    ? Generate custom CSS files? › yes
  4. Run npm run playground:new again, but this time select the following options:

    ? Is this playground for a component? › yes
    ? Which component is this playground for? › ion-button
    ? What should the playground path be? › withoutcss
    ? Select the Ionic Framework version for the playground › 8
    ? Generate custom CSS files? › no
  5. Add the following to docs/api/button.md before the ## Basic Usage section:

    ## Withcss
    
    import Withcss from '@site/static/usage/v8/button/withcss/index.md';
    
    <Withcss />
    
    ## Withoutcss
    
    import Withoutcss from '@site/static/usage/v8/button/withoutcss/index.md';
    
    <Withoutcss />
  6. Start the docs server: npm run start

  7. Open your browser and navigate to http://localhost:3000/docs/api/button

  8. Verify the following:

    • The Angular code examples look correct
    • The StackBlitz previews open without issues

Copy link

vercel bot commented Dec 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 3:53pm

@@ -11,9 +11,10 @@ import './main.css';<% } %>

function Example() {
return (
<<%= pascalComponent %>></<%= pascalComponent %>>
<>
<<%= pascalComponent %>></<%= pascalComponent %>>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was made because running npm run lint after adding a new playground was removing the () but this makes it so it passes lint and supports adding more child components.

@brandyscarney brandyscarney marked this pull request as ready for review December 31, 2024 15:55
@brandyscarney brandyscarney requested a review from a team as a code owner December 31, 2024 15:55
@brandyscarney brandyscarney merged commit f8949c0 into main Dec 31, 2024
4 checks passed
@brandyscarney brandyscarney deleted the fix-playground-templates branch December 31, 2024 16:27
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.

2 participants