File tree 8 files changed +29
-29
lines changed
8 files changed +29
-29
lines changed Original file line number Diff line number Diff line change 2
2
import "@ui5/webcomponents-base/src/browsersupport/Edge" ;
3
3
4
4
import "@ui5/webcomponents-base/src/shims/jquery-shim" ;
5
- import "./src /ThemePropertiesProvider" ;
5
+ import "./dist /ThemePropertiesProvider" ;
6
6
7
7
import Gregorian from "@ui5/webcomponents-core/dist/sap/ui/core/date/Gregorian" ;
8
8
import Buddhist from "@ui5/webcomponents-core/dist/sap/ui/core/date/Buddhist" ;
Original file line number Diff line number Diff line change 1
1
const postcssImport = require ( 'postcss-import' ) ;
2
2
const postcssAddFallback = require ( '../../lib/postcss-add-fallback/index.js' ) ;
3
3
const combineSelectors = require ( 'postcss-combine-duplicated-selectors' ) ;
4
+ const postcssCSStoESM = require ( '../../lib/postcss-css-to-esm/index.js' ) ;
4
5
const cssnano = require ( 'cssnano' ) ;
5
6
6
7
module . exports = {
@@ -9,5 +10,6 @@ module.exports = {
9
10
postcssAddFallback ( ) ,
10
11
combineSelectors ( { removeDuplicatedProperties : true } ) ,
11
12
cssnano ( ) ,
13
+ postcssCSStoESM ( ) ,
12
14
]
13
15
} ;
Original file line number Diff line number Diff line change 1
1
const postcssNesting = require ( 'postcss-nesting' ) ;
2
2
const postcssAddFallback = require ( '../../lib/postcss-add-fallback/index.js' ) ;
3
+ const postcssCSStoESM = require ( '../../lib/postcss-css-to-esm/index.js' ) ;
3
4
const cssnano = require ( 'cssnano' ) ;
4
5
5
6
module . exports = {
6
7
plugins : [
7
8
postcssNesting ( ) ,
8
- postcssAddFallback ( { importFrom : "./dist/themes-next/sap_fiori_3/parameters-bundle.css" } ) ,
9
+ postcssAddFallback ( { importFrom : "./dist/css/ themes-next/sap_fiori_3/parameters-bundle.css" } ) ,
9
10
cssnano ( ) ,
11
+ postcssCSStoESM ( ) ,
10
12
]
11
13
} ;
Original file line number Diff line number Diff line change
1
+ const postcss = require ( 'postcss' ) ;
2
+ const fs = require ( 'fs' ) ;
3
+ const path = require ( 'path' ) ;
4
+ const mkdirp = require ( 'mkdirp' ) ;
5
+
6
+ module . exports = postcss . plugin ( 'add css to esm transform plugin' , function ( opts ) {
7
+ opts = opts || { } ;
8
+
9
+ return function ( root ) {
10
+ const css = JSON . stringify ( root . toString ( ) ) ;
11
+ const targetFile = root . source . input . from . replace ( "/src/" , "/dist/" ) ;
12
+
13
+ mkdirp . sync ( path . dirname ( targetFile ) ) ;
14
+
15
+ const filePath = `${ targetFile } .js` ;
16
+
17
+ fs . writeFileSync ( filePath , `export default ${ css } ` ) ;
18
+ }
19
+ } ) ;
Original file line number Diff line number Diff line change 54
54
"build:api" : " jsdoc -c ../../lib/jsdoc/config.json" ,
55
55
"build:docs" : " node ../../lib/documentation/index.js" ,
56
56
"build:styles" : " npm-run-all --sequential build:styles-bundles build:styles-components" ,
57
- "build:styles-bundles" : " postcss src/**/parameters-bundle.css --config config/postcss.bundles --base src --dir dist/" ,
58
- "build:styles-components" : " postcss src/themes-next/*.css --config config/postcss.components --base src --dir dist/" ,
59
- "watch:styles-bundles" : " postcss src/**/parameters-bundle.css --config config/postcss.bundles --base src --dir dist/ -w" ,
60
- "watch:styles-components" : " postcss src/themes-next/*.css --config config/postcss.components --base src --dir dist/ -w" ,
57
+ "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/ " ,
59
+ "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" ,
61
61
"clean" : " rimraf dist src/build" ,
62
62
"copy:src" : " copy-and-watch \" src/**/*.js\" \" src/**/i18n/*.json\" dist/" ,
63
63
"copy:i18n" : " cpx \" src/i18n/*.json\" dist/i18n" ,
Original file line number Diff line number Diff line change @@ -46,23 +46,6 @@ const getPlugins = ({ transpile }) => {
46
46
return gzipSize ;
47
47
}
48
48
} ) ) ;
49
- // component styles
50
- plugins . push (
51
- postcss ( {
52
- plugins : [ postcssNesting ( ) ] ,
53
- inject : false ,
54
- exclude : [ "**/*.less" , "**/parameters-bundle.css" ] ,
55
- } )
56
- ) ;
57
- // parameters bundle
58
- plugins . push (
59
- postcss ( {
60
- plugins : [ postcssImport ( ) , csso ( { comments : true } ) ] ,
61
- inject : false ,
62
- include : [ "**/parameters-bundle.css" ] ,
63
- exclude : [ "**/*.less" ] ,
64
- } )
65
- ) ;
66
49
67
50
plugins . push ( ui5DevImportCheckerPlugin ( ) ) ;
68
51
Original file line number Diff line number Diff line change 1
1
: root {
2
- --_ui5_button_base_min_width : 2.5rem ;
3
- --_ui5_button_base_min_compact_width : 2rem ;
4
- --_ui5_button_base_height : 2.5rem ;
5
- --_ui5_button_compact_height : 1.625rem ;
6
2
--_ui5_toggle_button_pressed_focussed : var (--sapUiToggleButtonPressedBorderColor );
7
3
--_ui5_toggle_button_pressed_focussed_hovered : var (--sapUiToggleButtonPressedBorderColor );
8
4
--_ui5_toggle_button_pressed_negative_hover : var (--sapUiButtonRejectActiveBackgroundDarken5 );
Original file line number Diff line number Diff line change 1
1
@import "../base/ToggleButton-parameters.css" ;
2
2
3
3
: root {
4
- --_ui5_button_base_min_width : 2.25rem ;
5
- --_ui5_button_base_height : 2.25rem ;
6
4
--_ui5_toggle_button_pressed_negative_hover : var (--sapUiButtonRejectActiveBackgroundLighten5 );
7
5
--_ui5_toggle_button_pressed_positive_hover : var (--sapUiButtonAcceptActiveBackgroundLighten5 );
8
6
}
You can’t perform that action at this time.
0 commit comments