({ root, templateDir, appName, alias, verbose, mode })
| 67 | }; |
| 68 | |
| 69 | const templateLoader = ({ root, templateDir, appName, alias, verbose, mode }) => ({ path }) => { |
| 70 | const flag = mode.includes('append') ? 'a+' : 'w'; |
| 71 | const file = fs.readFileSync(`${templateDir}/${path}`, 'utf8'); |
| 72 | const newFile = _.template(file); |
| 73 | const newPath = path.replace(/.template$/, '').replace(/.append$/, ''); |
| 74 | |
| 75 | writeFile(`${root}/${newPath}`, newFile({ project: alias, projectName: appName }), flag, verbose); |
| 76 | }; |
| 77 | |
| 78 | const fileLoader = ({ root, templateDir, appName, originalDirectory, alias, verbose }) => ({ |
| 79 | path, |
nothing calls this directly
no test coverage detected