- let full_built_pathname = require.resolve(
- await disk_build(
- pathname,
- async built_pathname => {
- let text = await fs_readFile(pathname, {encoding: 'utf-8'})
- console.log('building', pathname)
- return /*await*/ fs_writeFile(
- built_pathname,
- astring.generate(
- transform.transform(
- visitors,
- acorn.parse(
- `module.exports = async (${arg_names.join(', ')}) => {${text}}`
- )
- ),
- {} //indent: ''}
+ let render = await disk_build(
+ pathname,
+ async temp_pathname => {
+ let text = await fs_readFile(pathname, {encoding: 'utf-8'})
+ return /*await*/ fs_writeFile(
+ temp_pathname,
+ astring.generate(
+ transform.transform(
+ visitors,
+ acorn.parse(
+ `module.exports = async (${arg_names.join(', ')}) => {${text}}`
+ )