Update templates to avoid devDependencies and :global (#4544)

* devDependencies => dependencies

* :global -> is:global

* update lockfile

* remove unneeded markdown dependency
This commit is contained in:
Dan Jutan 2022-08-31 15:18:53 -04:00 committed by GitHub
parent a5b659e91c
commit ca2d0728e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 2709 additions and 2754 deletions

View file

@ -9,7 +9,7 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.2" "astro": "^1.1.1"
} }
} }

View file

@ -41,15 +41,19 @@ const { title } = Astro.props;
margin: 0; margin: 0;
} }
:global(h1) {
</style>
<style is:global>
h1 {
font-size: var(--font-size-xl); font-size: var(--font-size-xl);
} }
:global(h2) { h2 {
font-size: var(--font-size-lg); font-size: var(--font-size-lg);
} }
:global(code) { code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace; Bitstream Vera Sans Mono, Courier New, monospace;
} }

View file

@ -9,10 +9,10 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"@astrojs/mdx": "^0.10.3", "astro": "^1.1.1",
"@astrojs/mdx": "^0.10.2",
"@astrojs/rss": "^1.0.0", "@astrojs/rss": "^1.0.0",
"@astrojs/sitemap": "^1.0.0", "@astrojs/sitemap": "^1.0.0"
"astro": "^1.1.2"
} }
} }

View file

@ -7,7 +7,12 @@
"build": "astro --root demo build", "build": "astro --root demo build",
"serve": "astro --root demo preview" "serve": "astro --root demo preview"
}, },
<<<<<<< HEAD
"dependencies": {
"astro": "^1.1.1"
=======
"devDependencies": { "devDependencies": {
"astro": "^1.1.2" "astro": "^1.1.2"
>>>>>>> main
} }
} }

View file

@ -11,19 +11,17 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"astro": "^1.1.1",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^1.1.0",
"@astrojs/preact": "^1.0.2",
"@algolia/client-search": "^4.13.1", "@algolia/client-search": "^4.13.1",
"@docsearch/css": "^3.1.0", "@docsearch/css": "^3.1.0",
"@docsearch/react": "^3.1.0", "@docsearch/react": "^3.1.0",
"@types/react": "^17.0.45", "@types/react": "^17.0.45",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"devDependencies": {
"@astrojs/preact": "^1.0.2",
"@types/node": "^18.0.0", "@types/node": "^18.0.0",
"@types/react-dom": "^18.0.0", "@types/react-dom": "^18.0.0"
"@astrojs/react": "^1.1.1",
"astro": "^1.1.2"
} }
} }

View file

@ -135,13 +135,15 @@ const lang = getLanguageFromURL(currentPage);
max-width: 200px; max-width: 200px;
} }
:global(.search-item > *) {
flex-grow: 1;
}
@media (min-width: 50em) { @media (min-width: 50em) {
.search-item { .search-item {
max-width: 400px; max-width: 400px;
} }
} }
</style> </style>
<style is:global>
.search-item > * {
flex-grow: 1;
}
</style>

View file

@ -14,7 +14,8 @@ const sidebar = SIDEBAR[langCode];
<nav aria-labelledby="grid-left"> <nav aria-labelledby="grid-left">
<ul class="nav-groups"> <ul class="nav-groups">
{Object.entries(sidebar).map(([header, children]) => ( {
Object.entries(sidebar).map(([header, children]) => (
<li> <li>
<div class="nav-group"> <div class="nav-group">
<h2>{header}</h2> <h2>{header}</h2>
@ -32,7 +33,8 @@ const sidebar = SIDEBAR[langCode];
</ul> </ul>
</div> </div>
</li> </li>
))} ))
}
</ul> </ul>
</nav> </nav>
@ -101,13 +103,15 @@ const sidebar = SIDEBAR[langCode];
font-weight: 600; font-weight: 600;
} }
:global(:root.theme-dark) .nav-link a[aria-current='page'] {
color: hsla(var(--color-base-white), 100%, 1);
}
@media (min-width: 50em) { @media (min-width: 50em) {
.nav-groups { .nav-groups {
padding: 0; padding: 0;
} }
} }
</style> </style>
<style is:global>
:root.theme-dark .nav-link a[aria-current='page'] {
color: hsla(var(--color-base-white), 100%, 1);
}
</style>

View file

@ -47,11 +47,6 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
overflow-x: hidden; overflow-x: hidden;
} }
.layout :global(> *) {
width: 100%;
height: 100%;
}
.grid-sidebar { .grid-sidebar {
height: 100vh; height: 100vh;
position: sticky; position: sticky;
@ -78,15 +73,6 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
display: none; display: none;
} }
:global(.mobile-sidebar-toggle) {
overflow: hidden;
}
:global(.mobile-sidebar-toggle) #grid-left {
display: block;
top: 2rem;
}
@media (min-width: 50em) { @media (min-width: 50em) {
.layout { .layout {
overflow: initial; overflow: initial;
@ -116,6 +102,21 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
} }
} }
</style> </style>
<style is:global>
.layout > * {
width: 100%;
height: 100%;
}
.mobile-sidebar-toggle {
overflow: hidden;
}
.mobile-sidebar-toggle #grid-left {
display: block;
top: 2rem;
}
</style>
</head> </head>
<body> <body>

View file

@ -9,7 +9,7 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.2" "astro": "^1.1.1"
} }
} }

View file

@ -9,11 +9,10 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"@astrojs/alpinejs": "^0.1.1", "astro": "^1.1.1",
"@types/alpinejs": "^3.7.0",
"alpinejs": "^3.10.2", "alpinejs": "^3.10.2",
"astro": "^1.1.2" "@astrojs/alpinejs": "^0.1.1",
}, "@types/alpinejs": "^3.7.0"
"dependencies": {} }
} }

View file

@ -9,12 +9,10 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/lit": "^1.0.1",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0", "astro": "^1.1.1",
"lit": "^2.2.5" "lit": "^2.2.5",
"@astrojs/lit": "^1.0.0",
"@webcomponents/template-shadowroot": "^0.1.0"
} }
} }

View file

@ -9,6 +9,8 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
<<<<<<< HEAD
=======
"devDependencies": { "devDependencies": {
"@astrojs/preact": "^1.0.2", "@astrojs/preact": "^1.0.2",
"@astrojs/react": "^1.1.1", "@astrojs/react": "^1.1.1",
@ -17,12 +19,19 @@
"@astrojs/vue": "^1.0.0", "@astrojs/vue": "^1.0.0",
"astro": "^1.1.2" "astro": "^1.1.2"
}, },
>>>>>>> main
"dependencies": { "dependencies": {
"astro": "^1.1.1",
"preact": "^10.7.3", "preact": "^10.7.3",
"react": "^18.1.0", "react": "^18.1.0",
"react-dom": "^18.1.0", "react-dom": "^18.1.0",
"solid-js": "^1.4.3", "solid-js": "^1.4.3",
"svelte": "^3.48.0", "svelte": "^3.48.0",
"vue": "^3.2.37" "vue": "^3.2.37",
"@astrojs/preact": "^1.0.2",
"@astrojs/react": "^1.1.0",
"@astrojs/solid-js": "^1.1.0",
"@astrojs/svelte": "^1.0.0",
"@astrojs/vue": "^1.0.0"
} }
} }

View file

@ -9,11 +9,9 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/preact": "^1.0.2",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"preact": "^10.7.3" "astro": "^1.1.1",
"preact": "^10.7.3",
"@astrojs/preact": "^1.0.2"
} }
} }

View file

@ -9,14 +9,12 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/react": "^1.1.1",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"astro": "^1.1.1",
"react": "^18.1.0", "react": "^18.1.0",
"react-dom": "^18.1.0" "react-dom": "^18.1.0",
"@astrojs/react": "^1.1.0",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5"
} }
} }

View file

@ -9,11 +9,9 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/solid-js": "^1.1.0",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"solid-js": "^1.4.3" "astro": "^1.1.1",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^1.1.0"
} }
} }

View file

@ -9,11 +9,9 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/svelte": "^1.0.0",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"svelte": "^3.48.0" "svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.0",
"astro": "^1.1.1"
} }
} }

View file

@ -9,11 +9,9 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/vue": "^1.0.0",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"vue": "^3.2.37" "astro": "^1.1.1",
"vue": "^3.2.37",
"@astrojs/vue": "^1.0.0"
} }
} }

View file

@ -9,7 +9,7 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.2" "astro": "^1.1.1"
} }
} }

View file

@ -9,7 +9,7 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.2" "astro": "^1.1.1"
} }
} }

View file

@ -9,12 +9,10 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"preact": "^10.7.3",
"@astrojs/preact": "^1.0.2", "@astrojs/preact": "^1.0.2",
"astro": "^1.1.2", "astro": "^1.1.2",
"sass": "^1.52.2" "sass": "^1.52.2"
},
"dependencies": {
"preact": "^10.7.3"
} }
} }

View file

@ -11,15 +11,15 @@
"server": "node server/server.mjs" "server": "node server/server.mjs"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/node": "^1.0.0", },
"dependencies": {
"astro": "^1.1.1",
"svelte": "^3.48.0",
"@astrojs/svelte": "^1.0.0", "@astrojs/svelte": "^1.0.0",
"astro": "^1.1.2", "@astrojs/node": "^1.0.0",
"concurrently": "^7.2.1", "concurrently": "^7.2.1",
"lightcookie": "^1.0.25", "lightcookie": "^1.0.25",
"unocss": "^0.15.6", "unocss": "^0.15.6",
"vite-imagetools": "^4.0.4" "vite-imagetools": "^4.0.4"
},
"dependencies": {
"svelte": "^3.48.0"
} }
} }

View file

@ -9,12 +9,10 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": {
"@astrojs/react": "^1.1.1",
"astro": "^1.1.2"
},
"dependencies": { "dependencies": {
"astro": "^1.1.1",
"react": "^18.1.0", "react": "^18.1.0",
"react-dom": "^18.1.0" "react-dom": "^18.1.0",
"@astrojs/react": "^1.1.0"
} }
} }

View file

@ -9,9 +9,9 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"@astrojs/markdown-remark": "^1.1.1", "astro": "^1.1.1",
"astro": "^1.1.2", "@astrojs/markdown-remark": "^1.1.0",
"hast-util-select": "5.0.1", "hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1", "rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1", "rehype-slug": "^5.0.1",

View file

@ -9,8 +9,7 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"@astrojs/markdown-remark": "^1.1.1", "astro": "^1.1.1"
"astro": "^1.1.2"
} }
} }

View file

@ -9,10 +9,10 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"@astrojs/mdx": "^0.10.3", "astro": "^1.1.1",
"preact": "^10.6.5",
"@astrojs/preact": "^1.0.2", "@astrojs/preact": "^1.0.2",
"astro": "^1.1.2", "@astrojs/mdx": "^0.10.2"
"preact": "^10.6.5"
} }
} }

View file

@ -10,12 +10,10 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@nanostores/preact": "^0.1.3", "astro": "^1.1.1",
"nanostores": "^0.5.12", "preact": "^10.7.3",
"preact": "^10.7.3"
},
"devDependencies": {
"@astrojs/preact": "^1.0.2", "@astrojs/preact": "^1.0.2",
"astro": "^1.1.2" "nanostores": "^0.5.12",
"@nanostores/preact": "^0.1.3"
} }
} }

View file

@ -9,9 +9,9 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.1",
"@astrojs/tailwind": "^1.0.0", "@astrojs/tailwind": "^1.0.0",
"astro": "^1.1.2",
"autoprefixer": "^10.4.7", "autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1", "canvas-confetti": "^1.5.1",
"postcss": "^8.4.14", "postcss": "^8.4.14",

View file

@ -9,8 +9,8 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.2", "astro": "^1.1.1",
"vite-plugin-pwa": "0.11.11", "vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.3" "workbox-window": "^6.5.3"
} }

View file

@ -11,8 +11,8 @@
"astro": "astro", "astro": "astro",
"test": "vitest" "test": "vitest"
}, },
"devDependencies": { "dependencies": {
"astro": "^1.1.2", "astro": "^1.1.1",
"vitest": "^0.20.3" "vitest": "^0.20.3"
} }
} }

File diff suppressed because it is too large Load diff