Skip to content
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

Merged
merged 8 commits into from
Mar 6, 2020

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Feb 24, 2020

Thank you for your contribution! 🙌

To get it merged faster, kindly review the checklist below:

Pull Request Checklist

@coveralls
Copy link

coveralls commented Feb 25, 2020

Coverage Status

Coverage increased (+0.08%) to 91.02% when pulling 5da7ed5 on theme-filtering into 1b53921 on master.

@matz3 matz3 marked this pull request as ready for review February 26, 2020 08:35
@@ -18,56 +20,107 @@ const fsInterface = require("@ui5/fs").fsInterface;
* @param {boolean} [parameters.options.cssVariables=false]
Copy link
Member

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

return workspace.write(resource);
}));
if (!themeAvailable) {
log.verbose(`Skipping ${resourcePath}: sap.ui.core theme '${themeName}' is not available`);
Copy link
Member

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.

@@ -347,6 +348,7 @@ module.exports = {
},
tasks: projectTasks,
project,
isRootProject,
Copy link
Member

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.

Copy link
Member Author

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");
Copy link
Member

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?

Copy link
Member Author

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 😄

@matz3 matz3 merged commit 848c503 into master Mar 6, 2020
@matz3 matz3 deleted the theme-filtering branch March 6, 2020 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants