import { fileSystemService , templateEngineService } from 'services' ; async param { PortInMemoryCompiler } props returns { Promise < String > } example export async function createInMemoryPort ( props ) { const { template , replacements } = props ; const { readFile } = fileSystemService ( ) ; const templateEngine = templateEngineService ( ) ; const templateFile = await readFile ( template ) ; const preCompiledPort = templateEngine . render ( templateFile , replacements ) ; return preCompiledPort ; }