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

fix: package gen script #10352

Merged
merged 3 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/scripts/turbo/generators/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
{
type: 'addMany',
destination: `${plop.getDestBasePath()}/../{{name}}`,
templateFiles: ['templates/**'],
// plop doesn't like our cliff.toml file since it tries to parse it. we add it manually later
templateFiles: ['templates/**', '!templates/default/cliff.toml'],
ckohen marked this conversation as resolved.
Show resolved Hide resolved
globOptions: { dot: true },
base: 'templates/default/',
stripExtensions: ['hbs'],
},
{
type: 'modify',
path: `${plop.getDestBasePath()}/turbo/generators/templates/cliff.toml`,
path: `${plop.getDestBasePath()}/turbo/generators/templates/default/cliff.toml`,
async transform(content, answers) {
const cliffTOML = content.replace('{{name}}', answers.name);
await writeFile(`${plop.getDestBasePath()}/../${answers.name}/cliff.toml`, cliffTOML);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Packages node_modules # Log files logs *.log npm-debug.log* # Runtime data pids *.pid *.seed # Env .env # Dist dist
dist-docs # Docs docs/**/* !docs/README.md # Miscellaneous .turbo .tmp coverage
dist-docs # Docs docs/**/* !docs/README.md # Miscellaneous .turbo .tmp coverage
Loading