mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Add .astro/
to .gitignore
in example projects (#5841)
* Delete committed types in with-content example * Add `.astro/` to `.gitignore` in example projects
This commit is contained in:
parent
5ed1bf4675
commit
1d43a3a6aa
24 changed files with 46 additions and 98 deletions
2
examples/basics/.gitignore
vendored
2
examples/basics/.gitignore
vendored
|
@ -1,6 +1,8 @@
|
|||
# build output
|
||||
dist/
|
||||
.output/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/blog/.gitignore
vendored
2
examples/blog/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/docs/.gitignore
vendored
2
examples/docs/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-alpine/.gitignore
vendored
2
examples/framework-alpine/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-lit/.gitignore
vendored
2
examples/framework-lit/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-multiple/.gitignore
vendored
2
examples/framework-multiple/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-preact/.gitignore
vendored
2
examples/framework-preact/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-react/.gitignore
vendored
2
examples/framework-react/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-solid/.gitignore
vendored
2
examples/framework-solid/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-svelte/.gitignore
vendored
2
examples/framework-svelte/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/framework-vue/.gitignore
vendored
2
examples/framework-vue/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/hackernews/.gitignore
vendored
2
examples/hackernews/.gitignore
vendored
|
@ -1,6 +1,8 @@
|
|||
# build output
|
||||
dist/
|
||||
.output/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/minimal/.gitignore
vendored
2
examples/minimal/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/non-html-pages/.gitignore
vendored
2
examples/non-html-pages/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/portfolio/.gitignore
vendored
2
examples/portfolio/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
98
examples/with-content/.astro/types.d.ts
vendored
98
examples/with-content/.astro/types.d.ts
vendored
|
@ -1,98 +0,0 @@
|
|||
declare module 'astro:content' {
|
||||
export { z } from 'astro/zod';
|
||||
export type CollectionEntry<C extends keyof typeof entryMap> =
|
||||
(typeof entryMap)[C][keyof (typeof entryMap)[C]] & Render;
|
||||
|
||||
type BaseSchemaWithoutEffects =
|
||||
| import('astro/zod').AnyZodObject
|
||||
| import('astro/zod').ZodUnion<import('astro/zod').AnyZodObject[]>
|
||||
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
|
||||
| import('astro/zod').ZodIntersection<
|
||||
import('astro/zod').AnyZodObject,
|
||||
import('astro/zod').AnyZodObject
|
||||
>;
|
||||
|
||||
type BaseSchema =
|
||||
| BaseSchemaWithoutEffects
|
||||
| import('astro/zod').ZodEffects<BaseSchemaWithoutEffects>;
|
||||
|
||||
type BaseCollectionConfig<S extends BaseSchema> = {
|
||||
schema?: S;
|
||||
slug?: (entry: {
|
||||
id: CollectionEntry<keyof typeof entryMap>['id'];
|
||||
defaultSlug: string;
|
||||
collection: string;
|
||||
body: string;
|
||||
data: import('astro/zod').infer<S>;
|
||||
}) => string | Promise<string>;
|
||||
};
|
||||
export function defineCollection<S extends BaseSchema>(
|
||||
input: BaseCollectionConfig<S>
|
||||
): BaseCollectionConfig<S>;
|
||||
|
||||
export function getEntry<C extends keyof typeof entryMap, E extends keyof (typeof entryMap)[C]>(
|
||||
collection: C,
|
||||
entryKey: E
|
||||
): Promise<(typeof entryMap)[C][E] & Render>;
|
||||
export function getCollection<
|
||||
C extends keyof typeof entryMap,
|
||||
E extends keyof (typeof entryMap)[C]
|
||||
>(
|
||||
collection: C,
|
||||
filter?: (data: (typeof entryMap)[C][E]) => boolean
|
||||
): Promise<((typeof entryMap)[C][E] & Render)[]>;
|
||||
|
||||
type InferEntrySchema<C extends keyof typeof entryMap> = import('astro/zod').infer<
|
||||
Required<ContentConfig['collections'][C]>['schema']
|
||||
>;
|
||||
|
||||
type Render = {
|
||||
render(): Promise<{
|
||||
Content: import('astro').MarkdownInstance<{}>['Content'];
|
||||
headings: import('astro').MarkdownHeading[];
|
||||
remarkPluginFrontmatter: Record<string, any>;
|
||||
}>;
|
||||
};
|
||||
|
||||
const entryMap: {
|
||||
blog: {
|
||||
'first-post.md': {
|
||||
id: 'first-post.md';
|
||||
slug: 'first-post';
|
||||
body: string;
|
||||
collection: 'blog';
|
||||
data: InferEntrySchema<'blog'>;
|
||||
};
|
||||
'markdown-style-guide.md': {
|
||||
id: 'markdown-style-guide.md';
|
||||
slug: 'markdown-style-guide';
|
||||
body: string;
|
||||
collection: 'blog';
|
||||
data: InferEntrySchema<'blog'>;
|
||||
};
|
||||
'second-post.md': {
|
||||
id: 'second-post.md';
|
||||
slug: 'second-post';
|
||||
body: string;
|
||||
collection: 'blog';
|
||||
data: InferEntrySchema<'blog'>;
|
||||
};
|
||||
'third-post.md': {
|
||||
id: 'third-post.md';
|
||||
slug: 'third-post';
|
||||
body: string;
|
||||
collection: 'blog';
|
||||
data: InferEntrySchema<'blog'>;
|
||||
};
|
||||
'using-mdx.mdx': {
|
||||
id: 'using-mdx.mdx';
|
||||
slug: 'using-mdx';
|
||||
body: string;
|
||||
collection: 'blog';
|
||||
data: InferEntrySchema<'blog'>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
type ContentConfig = typeof import('../src/content/config');
|
||||
}
|
2
examples/with-content/.gitignore
vendored
2
examples/with-content/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-markdown-plugins/.gitignore
vendored
2
examples/with-markdown-plugins/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-markdown-shiki/.gitignore
vendored
2
examples/with-markdown-shiki/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-mdx/.gitignore
vendored
2
examples/with-mdx/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-nanostores/.gitignore
vendored
2
examples/with-nanostores/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-tailwindcss/.gitignore
vendored
2
examples/with-tailwindcss/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-vite-plugin-pwa/.gitignore
vendored
2
examples/with-vite-plugin-pwa/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
2
examples/with-vitest/.gitignore
vendored
2
examples/with-vitest/.gitignore
vendored
|
@ -1,5 +1,7 @@
|
|||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
|
Loading…
Reference in a new issue