serverless/serverless

Allow to create new projects (intelligently) in existing directory

Open

#9,456 opened on May 10, 2021

View on GitHub
 (8 comments) (0 reactions) (0 assignees)JavaScript (46,915 stars) (5,734 forks)batch import
cat/templateenhancementhelp wantedneeds feedback

Description

When creating a new service via serverless create, cloudflare-workers template won't complete if .gitignore is present, and cannot be ignored.

Use case description

When creating a new service using the cloudflare-workers template (and likely others, I'm not sure), I may already have a .gitignore file which covers more things than just Serverless. I don't want to override it. Maybe I want to add to it. But I don't want to be blocked from creating the initial setup for a new service if I want to keep my .gitignore.

Proposed solution

Provide a CLI flag to avoid trying to create a .gitignore file. Ideally, provide an option to merge with existing.

Related: https://github.com/serverless/serverless/issues/3582

Contributor guide