Ask for recreating ( overwritting files) the current project folder

Open
#25,453 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
angular, typescript
Domain
cli

Research direction

Start at the ng new command entry point and trace how it handles an existing project folder. Add the requested confirmation or error behavior, including alternative-name guidance, and verify that existing files are not replaced.

Written by the indexing model from the issue text.

Description

area: @schematics/angular freq1: low severity3: broken type: bug/fix
Command

new

Description

I'm new to Angular and I just started using its CLI, it's easy to use and I appreciate it a lot.

However, I have noticed that it misses ( based on my experience with NextJS CLI) to ask the developer if the project ( folder ) exists and if he is sure that he wants to recreate the project and remove the old files.

STEP 01

ng new my app

STEP 02

Write some code and save the changes.

STEP 03

ng new my app

Expected

The CLI asks that the project name exists.

Current

Create a new project with the same name and replace older files with the new ones.

Describe the solution you'd like

The CLI should inform the developer that the project name exists and recommends alternative names.

Describe alternatives you've considered

Invoke an error and enforce the user to change the name of the project name.

Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
16h 35m
Merged PRs (30d)
176

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.

More from angular/angular-cli

All issues in angular/angular-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.