create-create-app
create-create-app copied to clipboard
Feature: Export copy function from template.ts for library use
The copy function defined in template.ts would be extremely helpful for more complicated create-app. This change could be made by a single addition in index.ts:
+ export { copy } from "./template";
This would allow use cases such as my own:
import {copy} from 'create-create-app';
copy({
sourceDir: globalTemplateDir,
targetDir: packageDir,
view: { ...answers, year, packageManager },
});
In this example, I am creating a templates-global folder to store code that is the same between all of my templates, and I am calling copy to handle the handlebars execution.