pbkit icon indicating copy to clipboard operation
pbkit copied to clipboard

pb gen ts - Remove all files in output directory before gen

Open hyp3rflow opened this issue 4 years ago • 3 comments

As-is

  • pb-gen-ts가 기존 output 폴더에 있는 파일들을 삭제하지 않습니다.
  • 따라서 output 폴더에 이전 코드젠 파일이 쌓일 경우 예기치 못한 에러를 유발하거나, 코드를 찾기 힘든 경우가 생길 수 있습니다.

To-be

  • output 폴더를 지우고 코드젠을 시작합니다.

hyp3rflow avatar Jan 04 '22 08:01 hyp3rflow

Removing might cause another problem also. How about adding an option?

algoshipda avatar Jan 04 '22 08:01 algoshipda

What problems can be occurred? If not removed, It can make a difference between the developing environment and the CI/CD environment. @algoshipda

hyp3rflow avatar Jan 10 '22 04:01 hyp3rflow

I think there could be a use case emitting multi build outputs in one output folder and I just checked Typescript options, it also has the clean option. https://www.typescriptlang.org/docs/handbook/compiler-options.html @hyp3rflow

algoshipda avatar Jan 11 '22 02:01 algoshipda

@algoshipda Now we have apparent use-case for multi build outputs like using wrp. So it can be considering that providing options for removing output folder or not providing at all. (the clean option in tsc seems that it removes all outputs from tsc)

hyp3rflow avatar Oct 22 '22 04:10 hyp3rflow