* Convert "App.{ext}" ~> "App/index.{ext}" * @param {String} str The original filename * @param {String} dest The (absolute) target directory * @return {String}
(str, dest)
| 64 | * @return {String} |
| 65 | */ |
| 66 | function toAppFile(str, dest) { |
| 67 | let { dir, name, ext } = parse(str); |
| 68 | dir = join(dest, dir, name); |
| 69 | name = 'index'; |
| 70 | return format({ dir, name, ext }); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Copy `templates/{dir}/**` ~> `${dest}/**` |