mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-15 09:14:11 +02:00
dfb34d81a2
* Automatically add the .focalboard-body class to all sass classes on plugin mode * Addressing review comment
22 lines
713 B
JavaScript
22 lines
713 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
function blockList(line) {
|
|
return line.startsWith('.focalboard-body') ||
|
|
line.startsWith('.GlobalHeaderComponent') ||
|
|
line.startsWith('.channel-header__icon .LogoIcon') ||
|
|
line.startsWith('.focalboard-plugin-root');
|
|
}
|
|
|
|
module.exports = function loader(source) {
|
|
var newSource = [];
|
|
source.split('\n').forEach((line) => {
|
|
if ((line.startsWith('.') || line.startsWith('#')) && !blockList(line)) {
|
|
newSource.push('.focalboard-body ' + line);
|
|
} else {
|
|
newSource.push(line);
|
|
}
|
|
});
|
|
return newSource.join('\n');
|
|
};
|