MCPcopy Index your code
hub / github.com/ampproject/amphtml / transform

Function transform

build-system/server/new-server/transforms/transform.ts:28–32  ·  view source on GitHub ↗
(fileLocation: string)

Source from the content-addressed store, hash-verified

26}
27
28export async function transform(fileLocation: string): Promise<string> {
29 const source = await fs.promises.readFile(fileLocation, 'utf8');
30 const result = await posthtml(transforms).process(source);
31 return result.html;
32}
33
34export function transformSync(content: string): string {
35 // @ts-ignore We can only use posthtml's sync API in our Karma preprocessor.

Callers 1

router.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected