Search code examples
typescripttsc

Is there any clean up command in TypeScript to delete the build files and folders? (like we have 'mvn clean' in Maven projects)


I am currently working on an automation project using Protractor & TypeScript and I am failry new at both these tools. I have a 'src' folder for all my '.ts' files & 'js-files' folder for all the typescript compiler generated '.js' files. So, I am wondering if there is any native command in typescript that cleans/deletes this generated 'js-files' folder, something like 'mvn clean' in Maven projects.

Any suggestion/help is apreciated; thank you for your time.


Solution

  • Use --clean option with build command like tsc --build --clean

    --clean Option delete the outputs of all projects

    Compiler options in official documentation