mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
[ci] yarn format
This commit is contained in:
parent
1f6fe888db
commit
cab79548db
4 changed files with 14 additions and 26 deletions
|
@ -177,11 +177,7 @@ export interface ComponentInfo {
|
|||
|
||||
export type Components = Map<string, ComponentInfo>;
|
||||
|
||||
type AsyncRendererComponentFn<U> = (
|
||||
Component: any,
|
||||
props: any,
|
||||
children: string | undefined
|
||||
) => Promise<U>;
|
||||
type AsyncRendererComponentFn<U> = (Component: any, props: any, children: string | undefined) => Promise<U>;
|
||||
|
||||
export interface Renderer {
|
||||
check: AsyncRendererComponentFn<boolean>;
|
||||
|
|
|
@ -17,12 +17,7 @@ interface RendererInstance {
|
|||
const CONFIG_MODULE_BASE_NAME = '__astro_config.js';
|
||||
const CONFIG_MODULE_URL = `/_astro_frontend/${CONFIG_MODULE_BASE_NAME}`;
|
||||
|
||||
const DEFAULT_RENDERERS = [
|
||||
'@astrojs/renderer-vue',
|
||||
'@astrojs/renderer-svelte',
|
||||
'@astrojs/renderer-react',
|
||||
'@astrojs/renderer-preact'
|
||||
];
|
||||
const DEFAULT_RENDERERS = ['@astrojs/renderer-vue', '@astrojs/renderer-svelte', '@astrojs/renderer-react', '@astrojs/renderer-preact'];
|
||||
|
||||
export class ConfigManager {
|
||||
private state: 'initial' | 'dirty' | 'clean' = 'initial';
|
||||
|
@ -31,10 +26,7 @@ export class ConfigManager {
|
|||
private rendererNames!: string[];
|
||||
private version = 1;
|
||||
|
||||
constructor(
|
||||
private astroConfig: AstroConfig,
|
||||
private resolvePackageUrl: (pkgName: string) => Promise<string>,
|
||||
) {
|
||||
constructor(private astroConfig: AstroConfig, private resolvePackageUrl: (pkgName: string) => Promise<string>) {
|
||||
this.setRendererNames(this.astroConfig);
|
||||
}
|
||||
|
||||
|
@ -118,7 +110,7 @@ export class ConfigManager {
|
|||
|
||||
import { setRenderers } from 'astro/dist/internal/__astro_component.js';
|
||||
|
||||
let rendererSources = [${rendererClientPackages.map(pkg => `"${pkg}"`).join(', ')}];
|
||||
let rendererSources = [${rendererClientPackages.map((pkg) => `"${pkg}"`).join(', ')}];
|
||||
let renderers = [${rendererServerPackages.map((_, i) => `__renderer_${i}`).join(', ')}];
|
||||
|
||||
${contents}
|
||||
|
|
Loading…
Add table
Reference in a new issue