SAP / ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
https://sap.github.io/ui5-tooling
Apache License 2.0
465 stars 69 forks source link

No cleaning of dist folder before build #182

Closed Domae84 closed 5 years ago

Domae84 commented 5 years ago

Expected Behavior

The dist folder should be cleaned before a build

Current Behavior

When you build your app when a dist folder allready exists, all old files which may not be part of the application anymore, still remains in the dist folder and will be part of the new build.

Steps to reproduce the issue

  1. Build an app with ui5 build
  2. Delete a file from you app (e.g. a controller/view)
  3. Build the app again
  4. Deleted file still part of dist folder

Context

Affected components (if known)

If this behaviour is supposed to be like this, is there a way to clean the dist folder before the execution of the actual build, without using Grunt or something else?

Best Regards Domae

htammen commented 5 years ago

Hi Dominik, you're right. In the meantime you can use this script which is the default if you create the project with Easy-ui5 generator "build-ui": "rimraf dist && ui5 build --a"

RandomByte commented 5 years ago

This is a duplicate of https://github.com/SAP/ui5-builder/issues/45.

@mauriciolauffer already implemented the necessary API for the UI5 Builder: https://github.com/SAP/ui5-builder/pull/306. It just needs to be exposed in the CLI.

Domae84 commented 5 years ago

@RandomByte Thanks for your quick answer. I just updated my ui5 tooling. My ui5-builder is now at version 1.5.1. Is there any CLI parameter to use this feature or how do I clean the dist folder? I tried the parameter clean-dest like you mentioned, but without any success.

RandomByte commented 5 years ago

The CLI parameter is not yet available. But will be very soon 😉: https://github.com/SAP/ui5-cli/pull/243

RandomByte commented 5 years ago

UI5 CLI v1.9.0 adds the --clean-dest parameter. Use it like this: ui5 build --clean-dest.

Thanks @mauriciolauffer for implementing this new feature!

Domae84 commented 5 years ago

It works like a charm! Thanks a lot @mauriciolauffer and @RandomByte