ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.59k stars 789 forks source link

stencil generate overwrites without warning #2672

Closed anonimusprogramus closed 2 years ago

anonimusprogramus commented 4 years ago

Stencil version:

 @stencil/core@2.0.3

I'm submitting a: [x] bug report

Current behavior: Generating new component with stencil g overwrites already exists one without warning.

Expected behavior: Warn user if component with same name already exists.

Steps to reproduce:

  1. run npm init stencil, choose app, follow steps until finish.
  2. run npx stencil g x-button, write code and save.
  3. run npx stencil g x-button again
  4. x-button got overwrited
rwaskiewicz commented 2 years ago

@anonimusprogramus A fix for this issue has been released as a part of Stencil v2.15.2. Moving forward, Stencil is going to warn folks explicitly when a file(s) is going to be overwritten like so:

Screen Shot 2022-05-09 at 1 31 15 PM

I'm going to close this issue. Thanks again!