Skip to content

Commit

Permalink
minify: Add new tag 'HasDebugVariant'
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomByte committed Nov 11, 2021
1 parent 9d0f878 commit 583c74e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/builder/BuildContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const ProjectBuildContext = require("./ProjectBuildContext");

const GLOBAL_TAGS = Object.freeze({
IsDebugVariant: "ui5:IsDebugVariant",
HasDebugVariant: "ui5:HasDebugVariant",
});

/**
Expand Down
1 change: 1 addition & 0 deletions lib/builder/ProjectBuildContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const STANDARD_TAGS = Object.freeze({
OmitFromBuildResult: "ui5:OmitFromBuildResult",
IsBundle: "ui5:IsBundle",
IsDebugVariant: "ui5:IsDebugVariant",
HasDebugVariant: "ui5:HasDebugVariant",
});

/**
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = async function({workspace, taskUtil, options: {pattern}}) {

return Promise.all(processedResources.map(async ({resource, dbgResource, sourceMap}) => {
if (taskUtil) {
taskUtil.setTag(resource, taskUtil.STANDARD_TAGS.HasDebugVariant);
taskUtil.setTag(dbgResource, taskUtil.STANDARD_TAGS.IsDebugVariant);
}
return Promise.all([
Expand Down

0 comments on commit 583c74e

Please sign in to comment.