(cwd: string)
| 271 | }; |
| 272 | |
| 273 | const esmBootstrap = (cwd: string) => { |
| 274 | const packageJsonPath = path.join(cwd, "package.json"); |
| 275 | const packageJSON = JSON.parse(readFileSync(packageJsonPath, { encoding: "utf-8" })); |
| 276 | |
| 277 | writeFileSync( |
| 278 | packageJsonPath, |
| 279 | JSON.stringify({ |
| 280 | ...packageJSON, |
| 281 | type: "module", |
| 282 | }), |
| 283 | ); |
| 284 | }; |
| 285 | |
| 286 | const templateFolder = [template, isExtendsTemplate ? "js" : "", "template"] |
| 287 | .filter((elem) => elem) |