Skip to content

chore(playground): update playground generator for v8 docs #3542

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

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Once you've generated your playground, you need to add it to the main markdown f
```
## Feature

import Feature from '@site/static/usage/v7/button/feature/index.md';
import Feature from '@site/static/usage/v8/button/feature/index.md';

<Feature />
```
6 changes: 3 additions & 3 deletions _templates/playground/new/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ module.exports = {
type: 'select',
name: 'version',
message: 'Select the Ionic Framework version for the playground',
initial: '7',
choices: ['6', '7'],
initial: '8',
choices: ['6', '7', '8'],
},
{
type: 'toggle',
Expand All @@ -77,7 +77,7 @@ module.exports = {

const playgroundName = changeCase.pascal(answers.path.split('/').pop());
console.log(
`\nTo use this playground in a docs markdown file, include\nthe following:\n\n## ${playgroundName}\n\nimport ${playgroundName} from '@site/static/usage/v7/${answers.name}/${answers.path}/index.md';\n\n<${playgroundName} />\n`
`\nTo use this playground in a docs markdown file, include\nthe following:\n\n## ${playgroundName}\n\nimport ${playgroundName} from '@site/static/usage/v${answers.version}/${answers.name}/${answers.path}/index.md';\n\n<${playgroundName} />\n`
);

return answers;
Expand Down