Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Export copy function from template.ts for library use #66

Open
aarondill opened this issue Feb 17, 2023 · 1 comment
Open

Feature: Export copy function from template.ts for library use #66

aarondill opened this issue Feb 17, 2023 · 1 comment

Comments

@aarondill
Copy link

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";
@aarondill
Copy link
Author

aarondill commented Feb 17, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant