Skip to content

Feature request: Generate .gitignore during npx campaign-init #3

@masmalsah

Description

@masmalsah

Summary

npx campaign-init sets up _data/campaigns.json and npm scripts, but doesn't generate a .gitignore. Developers have to create one manually or risk committing build output, editor files, and local config.

Proposed Solution

Generate a .gitignore as part of npx campaign-init (or prompt to create one if it doesn't already exist):

**/.DS_Store
.AppleDouble
.LSOverride
node_modules/
_site/
.tmp/
scss/
**/.sass-cache
/.sass-cache/
.vscode/
.cursor/

Local Netlify folder
.netlify

If a .gitignore already exists, skip or prompt rather than overwrite.

Why

_site/ (the build output) and node_modules/ are the critical ones — easy to accidentally commit without a .gitignore in place. The rest covers common editor and OS clutter that most projects exclude anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions