Skip to content

Commit a795859

Browse files
authored
docs: added further information on webpack (#1191)
* docs: added further information on webpack * Update getStarted.adoc * Update migrationGuide.adoc * Update db-ui-core-include.scss * Update files-folder-structure.adoc * Update db-ui-core-webpack.scss
1 parent f1d12ab commit a795859

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

docs/files-folder-structure.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ link:https://patternlab.io/[pattern lab] system structure files and folders are
2323
** `_css_`: Skeleton SCSS files that are including the SCSS files within the __patterns_ subfolders
2424
*** `helpers`: Providing some global SCSS helpers that are supporting common use cases
2525
*** `_db-ui-core.variables.scss`: Including global variables for DB UI Core that is only being handled as a SCSS partial
26-
*** `_rollup.assets-paths.scss` & `_webpack.assets-paths.scss`: Include either one of those in your SCSS file depending if and which bundler you're using in your setup before you `@import "db-ui-core";`; we're adapting the paths to assets in here differentiated by the different bundlers formats
26+
*** `_rollup.assets-paths.scss` & `_webpack.assets-paths.scss`: Include either one of those in your SCSS file depending if and which bundler you're using in your setup before you `@import "db-ui-core";`; we're adapting the paths to assets in here differentiated by the different bundlers formats. Import `_webpack.assets-paths.scss` for Webpack <5 or old `sass-loader`. With Webpack >= version 5 or newer `sass-loader`, please import file `_rollup.assets-paths.scss` instead.
2727
*** `db-ui-core.general.scss`: Providing some general global styles (especially) for DB UI Elements to be included in every Web Component and thatfor is actually meant to get exported during build as `db-ui-core.general.css`
2828
*** `db-ui-core.vars.scss`: Providing global variables (especially) for DB UI Elements that is actually meant to get exported during build as `db-ui-core.vars.css`
2929
*** `_pattern-scaffolding.css_`: _patternlab_ system related file for styling the _pattern lab_ UI

docs/getStarted.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ For Rollup based bundlers like Vite or Parcel we're providing the following SCSS
145145

146146
#### Webpack based bundlers (e.g. older Angular or Vue CLI versions)
147147

148+
This is meant for ecosystems in which Webpack <5 or old `sass-loader` are interated. With Webpack >= version 5 or newer `sass-loader`, please import file `_rollup.assets-paths.scss` instead.
149+
148150
[source,scss]
149151
----
150152
@use "@db-ui/core/sources/css/webpack.assets-paths" as webpackAssetsPaths;

docs/migrationGuide.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Please note that we've switched from the deprecated link:https://www.npmjs.com/p
3737

3838
You need to set the load path / include path depending on your SCSS compiler as described within our link:getStarted.adoc#scss-node_modules-include-path--load-path[getting started]
3939

40-
Additionally we've deprecated the `@db-ui/core/sources/css/enterprise/db-ui-core-include` SCSS endpoint – please either `@import` the file `@db-ui/core/sources/css/rollup.assets-paths` or `@db-ui/core/sources/css/webpack.assets-paths` depending on your bundler, previous to importing our main CSS via `@import @db-ui/core/sources/css/enterprise/db-ui-core` directly from now on.
40+
Additionally we've deprecated the `@db-ui/core/sources/css/enterprise/db-ui-core-include` SCSS endpoint – please either `@import` the file `@db-ui/core/sources/css/rollup.assets-paths` or `@db-ui/core/sources/css/webpack.assets-paths` (Webpack <5 or old sass-loader) depending on your bundler, previous to importing our main CSS via `@import @db-ui/core/sources/css/enterprise/db-ui-core` directly from now on.
4141

4242
==== SCSS Helper functions
4343

source/css/_webpack.assets-paths.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// If this library is used as an npm dependency, and the source files should be included rather than css, this corrects the paths.
2+
// Import this file for Webpack <5 or old sass-loader. With Webpack >= version 5 or newer sass-loader, please import file _rollup.assets-paths.scss instead.
23
$icons-path: "~@db-ui/core/dist/icons/";
34
$images-path: "~@db-ui/core/dist/images/";
45
$fonts-path: "~@db-ui/core/dist/fonts/";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Deprecated: This file shouldn't get used / included anymore.
2-
// Either `@import` the file `@db-ui/core/sources/css/rollup.assets-paths` or `@db-ui/core/sources/css/webpack.assets-paths` depending on your bundler, previous to `@import`ing e.g. the file `@db-ui/core/sources/css/enterprise/db-ui-core` directly from now on.
2+
// Either `@import` the file `@db-ui/core/sources/css/rollup.assets-paths` or `@db-ui/core/sources/css/webpack.assets-paths` (Webpack <5 or old sass-loader) depending on your bundler, previous to `@import`ing e.g. the file `@db-ui/core/sources/css/enterprise/db-ui-core` directly from now on.
33
@import "db-ui-core-webpack";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Deprecated: This file shouldn't get used / included anymore.
2-
// `@import` the file `@db-ui/core/sources/css/webpack.assets-paths`, previous to `@import`ing e.g. the file `@db-ui/core/sources/css/enterprise/db-ui-core` directly from now on.
2+
// `@import` the file `@db-ui/core/sources/css/webpack.assets-paths` (Webpack <5 or old sass-loader), previous to `@import`ing e.g. the file `@db-ui/core/sources/css/enterprise/db-ui-core` directly from now on.
33
@import "../webpack.assets-paths";
44
@import "db-ui-core";

0 commit comments

Comments
 (0)