Skip to content

feat: write output to git ignore#281

Merged
jonaslagoni merged 2 commits intomainfrom
add_gitignore
Dec 4, 2025
Merged

feat: write output to git ignore#281
jonaslagoni merged 2 commits intomainfrom
add_gitignore

Conversation

@jonaslagoni
Copy link
Contributor

@jonaslagoni jonaslagoni commented Dec 4, 2025

Note

Adds a flag and interactive option to append generated output directories to .gitignore using new gitignore utilities, with comprehensive tests.

  • Init command (src/commands/init.ts):
    • Add --gitignore-generated flag and interactive prompt to control adding generated outputs to .gitignore.
    • Propagate gitignoreGenerated through flag realization and interactive flow.
    • After config creation, collect enabled generators’ outputPaths and call updateGitignore; logs success/warnings.
  • Utilities (src/utils/gitignore.ts):
    • New updateGitignore to create/update .gitignore with generated paths; supports custom base dir/header; returns structured result.
    • New collectOutputPaths helper to gather generator outputPaths.
  • Tests:
    • Add test/utils/gitignore.spec.ts covering create/update/skip/error cases and helpers.
    • Extend test/commands/init.spec.ts to validate --gitignore-generated across generators, config types, input types, and custom output directories.

Written by Cursor Bugbot for commit bebf7a4. This will update automatically on new commits. Configure here.

@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for the-codegen-project canceled.

Name Link
🔨 Latest commit bebf7a4
🔍 Latest deploy log https://app.netlify.com/projects/the-codegen-project/deploys/6931994597d8fe0008ba4406

@jonaslagoni jonaslagoni merged commit 54c3f56 into main Dec 4, 2025
20 checks passed
@jonaslagoni jonaslagoni deleted the add_gitignore branch December 4, 2025 16:06
@jonaslagoni
Copy link
Contributor Author

🎉 This PR is included in version 0.56.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments