serverless / serverless/serverless

Allow to create new projects (intelligently) in existing directory

Open
#9,456 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat/template enhancement help wanted needs feedback
Dominant language
JavaScript
Stars
46.9k
Forks
5.7k
Avg merge
10h 7m
Merged PRs (30d)
57

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the serverless create entry point and the cloudflare-workers template handling, then review related issue #3582. Done means creating a service in a directory with an existing .gitignore no longer fails, with the chosen behavior for skipping or merging documented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.