Playground improvements (#342)

Remove previews, add vs code task, open in chrome
This commit is contained in:
Andrew Prifer 2022-11-22 16:05:11 +01:00 committed by GitHub
parent 484cfeb8ba
commit e3a194c7dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

7
.vscode/tasks.json vendored
View file

@ -15,6 +15,13 @@
"type": "shell", "type": "shell",
"command": "yarn tsc --build --watch ./devEnv/typecheck-all-projects/tsconfig.all.json", "command": "yarn tsc --build --watch ./devEnv/typecheck-all-projects/tsconfig.all.json",
"problemMatcher": ["$tsc-watch"] "problemMatcher": ["$tsc-watch"]
},
{
"type": "npm",
"script": "playground",
"problemMatcher": [],
"label": "Playground",
"detail": "yarn workspace playground run serve"
} }
] ]
} }

View file

@ -15,9 +15,9 @@ export const ItemSectionWithPreviews = (props: {
return ( return (
<ItemContainer key={`li-${moduleName}`}> <ItemContainer key={`li-${moduleName}`}>
<ItemLink href={href}> <ItemLink href={href}>
<PreviewContainer> {/* <PreviewContainer>
<iframe src={href} frameBorder="0" tabIndex={-1} /> <iframe src={href} frameBorder="0" tabIndex={-1} />
</PreviewContainer> </PreviewContainer> */}
<ItemDesc> <ItemDesc>
<h3>{moduleName}</h3> <h3>{moduleName}</h3>
<p>{href}</p> <p>{href}</p>
@ -80,9 +80,9 @@ const ItemContainer = styled.div`
` `
const ItemListContainer = styled.div` const ItemListContainer = styled.div`
display: flex; display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 1rem; gap: 1rem;
flex-wrap: wrap;
margin-bottom: 2rem; margin-bottom: 2rem;
` `

View file

@ -2,7 +2,7 @@ import {spawn} from 'child_process'
export function openForOS(hostedAt: string) { export function openForOS(hostedAt: string) {
const open = { const open = {
darwin: ['open'], darwin: ['open', '-a', 'Google Chrome'],
linux: ['xdg-open'], linux: ['xdg-open'],
win32: ['cmd', '/c', 'start'], win32: ['cmd', '/c', 'start'],
} }