[ci] format

This commit is contained in:
matthewp 2022-05-11 14:54:52 +00:00 committed by github-actions[bot]
parent 3dc68e148e
commit 9c98ba81e1
3 changed files with 11 additions and 4 deletions

View file

@ -79,7 +79,9 @@ export class App {
const info = this.#routeDataToRouteInfo.get(routeData!)!;
const links = createLinkStylesheetElementSet(info.links, manifest.site);
const filteredScripts = info.scripts.filter(script => typeof script !== 'string' && script?.stage !== 'head-inline') as string[];
const filteredScripts = info.scripts.filter(
(script) => typeof script !== 'string' && script?.stage !== 'head-inline'
) as string[];
const scripts = createModuleScriptElementWithSrcSet(filteredScripts, manifest.site);
// Add all injected scripts to the page.

View file

@ -12,7 +12,7 @@ export interface RouteInfo {
routeData: RouteData;
file: string;
links: string[];
scripts: Array<string | {children: string, stage: string}>;
scripts: Array<string | { children: string; stage: string }>;
}
export type SerializedRouteInfo = Omit<RouteInfo, 'routeData'> & {

View file

@ -109,7 +109,12 @@ function buildManifest(
routes.push({
file: '',
links: Array.from(pageData.css),
scripts: [...scripts, ...astroConfig._ctx.scripts.filter(script => script.stage === 'head-inline').map(({stage, content}) => ({stage, children: content}))],
scripts: [
...scripts,
...astroConfig._ctx.scripts
.filter((script) => script.stage === 'head-inline')
.map(({ stage, content }) => ({ stage, children: content })),
],
routeData: serializeRouteData(pageData.route),
});
}