(projectName: string)
| 749 | } |
| 750 | |
| 751 | function toValidPackageName(projectName: string) { |
| 752 | return projectName |
| 753 | .trim() |
| 754 | .toLowerCase() |
| 755 | .replace(/\s+/g, '-') |
| 756 | .replace(/^[._]/, '') |
| 757 | .replace(/[^a-z\d\-~]+/g, '-') |
| 758 | } |
| 759 | |
| 760 | function copyDir(srcDir: string, destDir: string) { |
| 761 | fs.mkdirSync(destDir, { recursive: true }) |