Skip to content

Commit 2cf5e31

Browse files
authored
chore: remove all less files (#340)
* Remove all less files * Remove all build steps, related to the less files * Move all css files from theme-next to theme * Rename base-parameters-new.css to base-parameters.css * Rename global-parameters-new.css to global-parameters.css * Adapt the styles imports within all components * Change all occurrences of theme-next in file paths
1 parent 1b395a5 commit 2cf5e31

File tree

357 files changed

+62
-17690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+62
-17690
lines changed

packages/main/config/postcss.components/postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const cssnano = require('cssnano');
66
module.exports = {
77
plugins: [
88
postcssNesting(),
9-
postcssAddFallback({importFrom: "./dist/css/themes-next/sap_fiori_3/parameters-bundle.css"}),
9+
postcssAddFallback({importFrom: "./dist/css/themes/sap_fiori_3/parameters-bundle.css"}),
1010
cssnano({preset: [
1111
'default', {
1212
mergeLonghand: false, // https://github.com/cssnano/cssnano/issues/675

packages/main/entries-less.esm.js

Lines changed: 0 additions & 151 deletions
This file was deleted.

packages/main/lib/postcss-process-derived-colors/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports = postcss.plugin('process derived colors', function (opts) {
122122
opts = opts || {};
123123

124124
return async function (root) {
125-
const match = root.source.input.from.match(/themes-next\/(\w+)\//) || root.source.input.from.match(/themes-next\\(\w+)\\/);
125+
const match = root.source.input.from.match(/themes\/(\w+)\//) || root.source.input.from.match(/themes\\(\w+)\\/);
126126
const theme = match[1];
127127

128128
const prevPlugins = [...pluginQueue];
@@ -143,7 +143,7 @@ module.exports = postcss.plugin('process derived colors', function (opts) {
143143
let allParameters = root.toString();
144144

145145
// Step2: Collect derivation functions
146-
const derivationFactories = require(`../../src/themes-next/${theme}/derived-colors`);
146+
const derivationFactories = require(`../../src/themes/${theme}/derived-colors`);
147147
let derivations = {};
148148
derivationFactories.forEach(factory => {
149149
Object.assign(derivations, factory(lessFunctions));

packages/main/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
}
4545
},
4646
"scripts": {
47-
"build": "npm-run-all --sequential clean lint build:templates build:samples build:styles build:less copy:src build:bundle copy:i18n copy:webcomponents-polyfill ",
48-
"build:less": "rollup -c rollup.config.less.js",
47+
"build": "npm-run-all --sequential clean lint build:templates build:samples build:styles copy:src build:bundle copy:i18n copy:webcomponents-polyfill ",
4948
"build:bundle": "rollup -c --environment ES5_BUILD",
5049
"build:templates": "mkdirp src/build/compiled && node ./lib/hbs2ui5/index.js -d src/ -o src/build/compiled",
5150
"build:samples": "npm run copy:test --scripts-prepend-node-path && npm run build:api --scripts-prepend-node-path && npm run build:docs --scripts-prepend-node-path && node lib/playground/index.js",
@@ -55,17 +54,17 @@
5554
"build:docs": "node ../../lib/documentation/index.js",
5655
"build:styles": "npm-run-all --sequential build:styles-bundles build:styles-components",
5756
"build:styles-bundles": "postcss src/**/parameters-bundle.css --config config/postcss.bundles --base src --dir dist/css/",
58-
"build:styles-components": "postcss src/themes-next/*.css --config config/postcss.components --base src --dir dist/css/",
57+
"build:styles-components": "postcss src/themes/*.css --config config/postcss.components --base src --dir dist/css/",
5958
"watch:styles-bundles": "postcss src/**/parameters-bundle.css --config config/postcss.bundles --base src --dir dist/css/ -w",
60-
"watch:styles-components": "postcss src/themes-next/*.css --config config/postcss.components --base src --dir dist/css/ -w",
59+
"watch:styles-components": "postcss src/themes/*.css --config config/postcss.components --base src --dir dist/css/ -w",
6160
"clean": "rimraf dist src/build",
6261
"copy:src": "copy-and-watch \"src/**/*.js\" \"src/**/i18n/*.json\" dist/",
6362
"copy:i18n": "cpx \"src/i18n/*.json\" dist/i18n",
6463
"copy:test": "cpx \"test/**/*.*\" dist/test-resources",
6564
"copy:pages": "cpx \"test/**/pages/*.*\" dist/test-resources",
6665
"copy:qunit": "cpx \"test/**/qunit/*.*\" dist/test-resources",
6766
"copy:webcomponents-polyfill": "cpx \"../../node_modules/@webcomponents/webcomponentsjs/**/*.*\" dist/webcomponentsjs/",
68-
"dev": "npm-run-all --parallel watch:less watch:templates watch:samples watch:pages watch:qunit watch:src watch:bundle watch:styles-bundles watch:styles-components copy:webcomponents-polyfill",
67+
"dev": "npm-run-all --parallel watch:templates watch:samples watch:pages watch:qunit watch:src watch:bundle watch:styles-bundles watch:styles-components copy:webcomponents-polyfill",
6968
"start": "npm-run-all --parallel serve:static dev",
7069
"lint": "eslint .",
7170
"test:wdio": "npm-run-all --parallel --race serve:static test:wdio-run",
@@ -76,8 +75,7 @@
7675
"test:jest": "jest",
7776
"test": "npm-run-all --sequential test:jest test:wdio",
7877
"watch:src": "copy-and-watch --watch \"src/**/*.js\" \"src/**/i18n/*.json\" dist/",
79-
"watch:less": "rollup -c rollup.config.less.js -w",
80-
"watch:bundle": "wait-on dist/less-bundle/entries-less.esm.js && rollup -c -w --environment ES5_BUILD,DEV",
78+
"watch:bundle": "rollup -c -w --environment ES5_BUILD,DEV",
8179
"watch:templates": "npm-watch build:templates",
8280
"watch:samples": "npm-watch build:samples",
8381
"watch:pages": "npm-watch build:pages",

packages/main/rollup.config.less.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

packages/main/src/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import ButtonRenderer from "./build/compiled/ButtonRenderer.lit";
1010
import Icon from "./Icon";
1111

1212
// Styles
13-
import buttonCss from "./themes-next/Button.css";
13+
import buttonCss from "./themes/Button.css";
1414

1515
addCustomCSS("ui5-button", "sap_fiori_3", buttonCss);
1616
addCustomCSS("ui5-button", "sap_belize", buttonCss);

packages/main/src/Calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import CalendarRenderer from "./build/compiled/CalendarRenderer.lit";
2323
import "@ui5/webcomponents-core/dist/sap/ui/core/date/Gregorian";
2424

2525
// Styles
26-
import calendarCSS from "./themes-next/Calendar.css";
26+
import calendarCSS from "./themes/Calendar.css";
2727

2828
addCustomCSS("ui5-calendar", "sap_fiori_3", calendarCSS);
2929
addCustomCSS("ui5-calendar", "sap_belize_hcb", calendarCSS);

packages/main/src/CalendarHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ButtonType from "./types/ButtonType";
88
import CalendarHeaderRenderer from "./build/compiled/CalendarHeaderRenderer.lit";
99

1010
// Styles
11-
import styles from "./themes-next/CalendarHeader.css";
11+
import styles from "./themes/CalendarHeader.css";
1212

1313
addCustomCSS("ui5-calendar-header", "sap_belize", styles);
1414
addCustomCSS("ui5-calendar-header", "sap_belize_hcb", styles);

packages/main/src/Card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import CardRenderer from "./build/compiled/CardRenderer.lit";
99
import Icon from "./Icon";
1010

1111
// Styles
12-
import cardCss from "./themes-next/Card.css";
12+
import cardCss from "./themes/Card.css";
1313

1414
addCustomCSS("ui5-card", "sap_fiori_3", cardCss);
1515
addCustomCSS("ui5-card", "sap_belize", cardCss);

packages/main/src/CheckBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import CheckBoxTemplateContext from "./CheckBoxTemplateContext";
99
import Label from "./Label";
1010

1111
// Styles
12-
import checkboxCss from "./themes-next/CheckBox.css";
12+
import checkboxCss from "./themes/CheckBox.css";
1313

1414
addCustomCSS("ui5-checkbox", "sap_fiori_3", checkboxCss);
1515
addCustomCSS("ui5-checkbox", "sap_belize", checkboxCss);

0 commit comments

Comments
 (0)