feat(extensions-cli): Add .gitignore generation to init command (#36768)

This commit is contained in:
Michael S. Molina
2025-12-19 13:33:37 -03:00
committed by GitHub
parent 5920cb57ea
commit d36ddbbb33
4 changed files with 70 additions and 5 deletions

View File

@@ -484,6 +484,11 @@ def init(
(target_dir / "extension.json").write_text(extension_json)
click.secho("✅ Created extension.json", fg="green")
# Create .gitignore
gitignore = env.get_template(".gitignore.j2").render(ctx)
(target_dir / ".gitignore").write_text(gitignore)
click.secho("✅ Created .gitignore", fg="green")
# Initialize frontend files
if include_frontend:
frontend_dir = target_dir / "frontend"

View File

@@ -0,0 +1,36 @@
# Dependencies
node_modules/
# Build outputs
dist/
*.supx
# Python
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
.eggs/
*.egg
.venv/
venv/
env/
ENV/
# IDE
.idea/
.vscode/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
# Environment
.env
.env.local