mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
[ci] format
This commit is contained in:
parent
c2180746b4
commit
4b16e9ec99
4 changed files with 43 additions and 46 deletions
77
examples/with-content/.astro/types.d.ts
vendored
77
examples/with-content/.astro/types.d.ts
vendored
|
@ -55,45 +55,44 @@ declare module 'astro:content' {
|
||||||
};
|
};
|
||||||
|
|
||||||
const entryMap: {
|
const entryMap: {
|
||||||
"blog": {
|
blog: {
|
||||||
"first-post.md": {
|
'first-post.md': {
|
||||||
id: "first-post.md",
|
id: 'first-post.md';
|
||||||
slug: "first-post",
|
slug: 'first-post';
|
||||||
body: string,
|
body: string;
|
||||||
collection: "blog",
|
collection: 'blog';
|
||||||
data: InferEntrySchema<"blog">
|
data: InferEntrySchema<'blog'>;
|
||||||
},
|
};
|
||||||
"markdown-style-guide.md": {
|
'markdown-style-guide.md': {
|
||||||
id: "markdown-style-guide.md",
|
id: 'markdown-style-guide.md';
|
||||||
slug: "markdown-style-guide",
|
slug: 'markdown-style-guide';
|
||||||
body: string,
|
body: string;
|
||||||
collection: "blog",
|
collection: 'blog';
|
||||||
data: InferEntrySchema<"blog">
|
data: InferEntrySchema<'blog'>;
|
||||||
},
|
};
|
||||||
"second-post.md": {
|
'second-post.md': {
|
||||||
id: "second-post.md",
|
id: 'second-post.md';
|
||||||
slug: "second-post",
|
slug: 'second-post';
|
||||||
body: string,
|
body: string;
|
||||||
collection: "blog",
|
collection: 'blog';
|
||||||
data: InferEntrySchema<"blog">
|
data: InferEntrySchema<'blog'>;
|
||||||
},
|
};
|
||||||
"third-post.md": {
|
'third-post.md': {
|
||||||
id: "third-post.md",
|
id: 'third-post.md';
|
||||||
slug: "third-post",
|
slug: 'third-post';
|
||||||
body: string,
|
body: string;
|
||||||
collection: "blog",
|
collection: 'blog';
|
||||||
data: InferEntrySchema<"blog">
|
data: InferEntrySchema<'blog'>;
|
||||||
},
|
};
|
||||||
"using-mdx.mdx": {
|
'using-mdx.mdx': {
|
||||||
id: "using-mdx.mdx",
|
id: 'using-mdx.mdx';
|
||||||
slug: "using-mdx",
|
slug: 'using-mdx';
|
||||||
body: string,
|
body: string;
|
||||||
collection: "blog",
|
collection: 'blog';
|
||||||
data: InferEntrySchema<"blog">
|
data: InferEntrySchema<'blog'>;
|
||||||
},
|
};
|
||||||
},
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type ContentConfig = typeof import("../src/content/config");
|
type ContentConfig = typeof import('../src/content/config');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,14 +7,12 @@ import { normalizePath } from 'vite';
|
||||||
import type { AstroSettings } from '../@types/astro.js';
|
import type { AstroSettings } from '../@types/astro.js';
|
||||||
import { info, LogOptions, warn } from '../core/logger/core.js';
|
import { info, LogOptions, warn } from '../core/logger/core.js';
|
||||||
import { appendForwardSlash, isRelativePath } from '../core/path.js';
|
import { appendForwardSlash, isRelativePath } from '../core/path.js';
|
||||||
import { getEnvTsPath } from '../vite-plugin-inject-env-ts/index.js';
|
|
||||||
import { contentFileExts, CONTENT_TYPES_FILE } from './consts.js';
|
import { contentFileExts, CONTENT_TYPES_FILE } from './consts.js';
|
||||||
import {
|
import {
|
||||||
ContentConfig,
|
ContentConfig,
|
||||||
ContentObservable,
|
ContentObservable,
|
||||||
ContentPaths,
|
ContentPaths,
|
||||||
getContentPaths,
|
getContentPaths,
|
||||||
getDotAstroTypeReference,
|
|
||||||
getEntryInfo,
|
getEntryInfo,
|
||||||
loadContentConfig,
|
loadContentConfig,
|
||||||
NoCollectionError,
|
NoCollectionError,
|
||||||
|
|
|
@ -17,6 +17,7 @@ import configAliasVitePlugin from '../vite-plugin-config-alias/index.js';
|
||||||
import envVitePlugin from '../vite-plugin-env/index.js';
|
import envVitePlugin from '../vite-plugin-env/index.js';
|
||||||
import astroHeadPropagationPlugin from '../vite-plugin-head-propagation/index.js';
|
import astroHeadPropagationPlugin from '../vite-plugin-head-propagation/index.js';
|
||||||
import htmlVitePlugin from '../vite-plugin-html/index.js';
|
import htmlVitePlugin from '../vite-plugin-html/index.js';
|
||||||
|
import { astroInjectEnvTsPlugin } from '../vite-plugin-inject-env-ts/index.js';
|
||||||
import astroIntegrationsContainerPlugin from '../vite-plugin-integrations-container/index.js';
|
import astroIntegrationsContainerPlugin from '../vite-plugin-integrations-container/index.js';
|
||||||
import jsxVitePlugin from '../vite-plugin-jsx/index.js';
|
import jsxVitePlugin from '../vite-plugin-jsx/index.js';
|
||||||
import astroLoadFallbackPlugin from '../vite-plugin-load-fallback/index.js';
|
import astroLoadFallbackPlugin from '../vite-plugin-load-fallback/index.js';
|
||||||
|
@ -24,7 +25,6 @@ import markdownVitePlugin from '../vite-plugin-markdown/index.js';
|
||||||
import astroScannerPlugin from '../vite-plugin-scanner/index.js';
|
import astroScannerPlugin from '../vite-plugin-scanner/index.js';
|
||||||
import astroScriptsPlugin from '../vite-plugin-scripts/index.js';
|
import astroScriptsPlugin from '../vite-plugin-scripts/index.js';
|
||||||
import astroScriptsPageSSRPlugin from '../vite-plugin-scripts/page-ssr.js';
|
import astroScriptsPageSSRPlugin from '../vite-plugin-scripts/page-ssr.js';
|
||||||
import { astroInjectEnvTsPlugin } from '../vite-plugin-inject-env-ts/index.js';
|
|
||||||
|
|
||||||
interface CreateViteOptions {
|
interface CreateViteOptions {
|
||||||
settings: AstroSettings;
|
settings: AstroSettings;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import type { AstroSettings } from '../@types/astro.js';
|
import { bold } from 'kleur/colors';
|
||||||
import type fsMod from 'node:fs';
|
import type fsMod from 'node:fs';
|
||||||
import { normalizePath, Plugin } from 'vite';
|
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
import { normalizePath, Plugin } from 'vite';
|
||||||
|
import type { AstroSettings } from '../@types/astro.js';
|
||||||
import { getContentPaths, getDotAstroTypeReference } from '../content/index.js';
|
import { getContentPaths, getDotAstroTypeReference } from '../content/index.js';
|
||||||
import { info, LogOptions } from '../core/logger/core.js';
|
import { info, LogOptions } from '../core/logger/core.js';
|
||||||
import { fileURLToPath } from 'node:url';
|
|
||||||
import { bold } from 'kleur/colors';
|
|
||||||
|
|
||||||
export function getEnvTsPath({ srcDir }: { srcDir: URL }) {
|
export function getEnvTsPath({ srcDir }: { srcDir: URL }) {
|
||||||
return new URL('env.d.ts', srcDir);
|
return new URL('env.d.ts', srcDir);
|
||||||
|
|
Loading…
Add table
Reference in a new issue