(fileLocation: string)
| 26 | } |
| 27 | |
| 28 | export 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 | |
| 34 | export function transformSync(content: string): string { |
| 35 | // @ts-ignore We can only use posthtml's sync API in our Karma preprocessor. |