0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] format

This commit is contained in:
ematipico 2023-05-25 13:30:42 +00:00 committed by fredkbot
parent 8b041bf57c
commit 223e0131fc
6 changed files with 13 additions and 15 deletions

View file

@ -1,7 +1,6 @@
import type { MarkdownRenderingOptions } from '@astrojs/markdown-remark'; import type { MarkdownRenderingOptions } from '@astrojs/markdown-remark';
import type { import type {
AstroMiddlewareInstance, AstroMiddlewareInstance,
ComponentInstance,
RouteData, RouteData,
SerializedRouteData, SerializedRouteData,
SSRComponentMetadata, SSRComponentMetadata,

View file

@ -21,9 +21,9 @@ import {
getStaticImageList, getStaticImageList,
} from '../../assets/generate.js'; } from '../../assets/generate.js';
import { import {
eachPageDataFromEntryPoint,
hasPrerenderedPages, hasPrerenderedPages,
type BuildInternals, type BuildInternals,
eachPageDataFromEntryPoint,
} from '../../core/build/internal.js'; } from '../../core/build/internal.js';
import { import {
prependForwardSlash, prependForwardSlash,
@ -48,7 +48,7 @@ import { createRequest } from '../request.js';
import { matchRoute } from '../routing/match.js'; import { matchRoute } from '../routing/match.js';
import { getOutputFilename } from '../util.js'; import { getOutputFilename } from '../util.js';
import { getOutDirWithinCwd, getOutFile, getOutFolder } from './common.js'; import { getOutDirWithinCwd, getOutFile, getOutFolder } from './common.js';
import { cssOrder, eachPageData, getPageDataByComponent, mergeInlineCss } from './internal.js'; import { cssOrder, getPageDataByComponent, mergeInlineCss } from './internal.js';
import type { import type {
PageBuildData, PageBuildData,
SinglePageBuiltModule, SinglePageBuiltModule,
@ -56,7 +56,6 @@ import type {
StylesheetAsset, StylesheetAsset,
} from './types'; } from './types';
import { getTimeStat } from './util.js'; import { getTimeStat } from './util.js';
import { ASTRO_PAGE_MODULE_ID } from './plugins/plugin-pages';
function shouldSkipDraft(pageModule: ComponentInstance, settings: AstroSettings): boolean { function shouldSkipDraft(pageModule: ComponentInstance, settings: AstroSettings): boolean {
return ( return (

View file

@ -1,10 +1,10 @@
import type { Rollup } from 'vite'; import type { Rollup } from 'vite';
import type { PageBuildData, StylesheetAsset, ViteID } from './types';
import type { SSRResult } from '../../@types/astro'; import type { SSRResult } from '../../@types/astro';
import type { PageOptions } from '../../vite-plugin-astro/types'; import type { PageOptions } from '../../vite-plugin-astro/types';
import { prependForwardSlash, removeFileExtension } from '../path.js'; import { prependForwardSlash, removeFileExtension } from '../path.js';
import { viteID } from '../util.js'; import { viteID } from '../util.js';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN, ASTRO_PAGE_MODULE_ID } from './plugins/plugin-pages.js'; import { ASTRO_PAGE_EXTENSION_POST_PATTERN, ASTRO_PAGE_MODULE_ID } from './plugins/plugin-pages.js';
import type { PageBuildData, StylesheetAsset, ViteID } from './types';
export interface BuildInternals { export interface BuildInternals {
/** /**

View file

@ -1,3 +1,4 @@
import { extname } from 'node:path';
import type { Plugin as VitePlugin } from 'vite'; import type { Plugin as VitePlugin } from 'vite';
import { addRollupInput } from '../add-rollup-input.js'; import { addRollupInput } from '../add-rollup-input.js';
import { type BuildInternals } from '../internal.js'; import { type BuildInternals } from '../internal.js';
@ -5,7 +6,6 @@ import type { AstroBuildPlugin } from '../plugin';
import type { StaticBuildOptions } from '../types'; import type { StaticBuildOptions } from '../types';
import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
import { extname } from 'node:path';
export const ASTRO_PAGE_MODULE_ID = '@astro-page:'; export const ASTRO_PAGE_MODULE_ID = '@astro-page:';
export const ASTRO_PAGE_RESOLVED_MODULE_ID = '\0@astro-page:'; export const ASTRO_PAGE_RESOLVED_MODULE_ID = '\0@astro-page:';

View file

@ -1,21 +1,21 @@
import type { Plugin as VitePlugin } from 'vite';
import type { AstroAdapter } from '../../../@types/astro';
import type { SerializedRouteInfo, SerializedSSRManifest } from '../../app/types';
import type { StaticBuildOptions } from '../types';
import type { AstroBuildPlugin } from '../plugin';
import glob from 'fast-glob'; import glob from 'fast-glob';
import { fileURLToPath } from 'url'; import { fileURLToPath } from 'url';
import type { Plugin as VitePlugin } from 'vite';
import type { AstroAdapter } from '../../../@types/astro';
import { runHookBuildSsr } from '../../../integrations/index.js'; import { runHookBuildSsr } from '../../../integrations/index.js';
import { isHybridOutput } from '../../../prerender/utils.js'; import { isHybridOutput } from '../../../prerender/utils.js';
import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js'; import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
import type { SerializedRouteInfo, SerializedSSRManifest } from '../../app/types';
import { joinPaths, prependForwardSlash } from '../../path.js'; import { joinPaths, prependForwardSlash } from '../../path.js';
import { serializeRouteData } from '../../routing/index.js'; import { serializeRouteData } from '../../routing/index.js';
import { addRollupInput } from '../add-rollup-input.js'; import { addRollupInput } from '../add-rollup-input.js';
import { getOutFile, getOutFolder } from '../common.js'; import { getOutFile, getOutFolder } from '../common.js';
import { cssOrder, mergeInlineCss, type BuildInternals } from '../internal.js'; import { cssOrder, mergeInlineCss, type BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin';
import type { StaticBuildOptions } from '../types';
import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
import { getVirtualModulePageNameFromPath } from './plugin-pages.js'; import { getVirtualModulePageNameFromPath } from './plugin-pages.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry'; export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry';
const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID; const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID;

View file

@ -24,14 +24,14 @@ import { generatePages } from './generate.js';
import { trackPageData } from './internal.js'; import { trackPageData } from './internal.js';
import { createPluginContainer, type AstroBuildPluginContainer } from './plugin.js'; import { createPluginContainer, type AstroBuildPluginContainer } from './plugin.js';
import { registerAllPlugins } from './plugins/index.js'; import { registerAllPlugins } from './plugins/index.js';
import { RESOLVED_RENDERERS_MODULE_ID } from './plugins/plugin-renderers.js';
import type { PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js';
import { import {
ASTRO_PAGE_EXTENSION_POST_PATTERN, ASTRO_PAGE_EXTENSION_POST_PATTERN,
ASTRO_PAGE_RESOLVED_MODULE_ID, ASTRO_PAGE_RESOLVED_MODULE_ID,
} from './plugins/plugin-pages.js'; } from './plugins/plugin-pages.js';
import { RESOLVED_RENDERERS_MODULE_ID } from './plugins/plugin-renderers.js';
import { SSR_VIRTUAL_MODULE_ID } from './plugins/plugin-ssr.js'; import { SSR_VIRTUAL_MODULE_ID } from './plugins/plugin-ssr.js';
import type { PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js';
export async function viteBuild(opts: StaticBuildOptions) { export async function viteBuild(opts: StaticBuildOptions) {
const { allPages, settings } = opts; const { allPages, settings } = opts;