-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] buildThemes: Add filtering for available themes #419
Conversation
14ba0b3
to
0e468c4
Compare
@@ -18,56 +20,107 @@ const fsInterface = require("@ui5/fs").fsInterface; | |||
* @param {boolean} [parameters.options.cssVariables=false] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New optional parameter themesPattern
also needs to be documented here
lib/tasks/buildThemes.js
Outdated
return workspace.write(resource); | ||
})); | ||
if (!themeAvailable) { | ||
log.verbose(`Skipping ${resourcePath}: sap.ui.core theme '${themeName}' is not available`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we talked about it before, but what about adding a sentence like the following to the end? Maybe this helps devs running into issues to better understand what's going on:
If you experience missing themes, check whether you added the corresponding theme library to your projects dependencies and make sure that your custom themes contain resources for the sap.ui.core namespace.
lib/builder/builder.js
Outdated
@@ -347,6 +348,7 @@ module.exports = { | |||
}, | |||
tasks: projectTasks, | |||
project, | |||
isRootProject, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could add a reference of the root project to the BuildContext. Then you can check whether the project currently being built is equal to the root project in the build context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -5,6 +5,10 @@ const mock = require("mock-require"); | |||
|
|||
let buildThemes = require("../../../lib/tasks/buildThemes"); | |||
|
|||
test.before(() => { | |||
require("@ui5/logger").setLevel("verbose"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intentionally added or is it a leftover from some debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intensionally, to also cover the verbose logging code.
Should I add a comment? I actually removed it as I thought it would be clear 😄
Thank you for your contribution! 🙌
To get it merged faster, kindly review the checklist below:
Pull Request Checklist