( path: string, data: string, rootDir: string )
| 838 | } |
| 839 | |
| 840 | async function writeEntrypointFile( |
| 841 | path: string, |
| 842 | data: string, |
| 843 | rootDir: string |
| 844 | ) { |
| 845 | try { |
| 846 | await fs.writeFile(path, data); |
| 847 | } catch (err: any) { |
| 848 | if (err.code === 'ENOENT') { |
| 849 | throw new Error( |
| 850 | `The "${relative(rootDir, dirname(path))}" directory does not exist.` |
| 851 | ); |
| 852 | } |
| 853 | throw err; |
| 854 | } |
| 855 | } |
no test coverage detected