From c5738fc355103c7feb1edf1643969be46a16d893 Mon Sep 17 00:00:00 2001 From: Nicolas Merget <104347736+nmerget@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:47:19 +0100 Subject: [PATCH] fix: issues for asset paths and rename webpack.assets-paths (#143) fix: issues for asset paths and rename webpack.assets-paths to sass.assets-path --- scss/_rollup.assets-paths.scss | 8 +++++--- scss/_sass.assets-paths.scss | 6 ++++++ scss/_webpack.assets-paths.scss | 4 ---- scss/icon/icons.scss | 10 ++++------ 4 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 scss/_sass.assets-paths.scss delete mode 100644 scss/_webpack.assets-paths.scss diff --git a/scss/_rollup.assets-paths.scss b/scss/_rollup.assets-paths.scss index ea144bb65..69dc49247 100644 --- a/scss/_rollup.assets-paths.scss +++ b/scss/_rollup.assets-paths.scss @@ -1,4 +1,6 @@ // If this library is used as an npm dependency, and the source files should be included rather than css, this corrects the paths. -$icons-path: "@db-ui/core/dist/icons/"; -$images-path: "@db-ui/core/dist/images/"; -$fonts-path: "@db-ui/core/dist/fonts/"; +@use "default.assets-paths" as * with ( + $icons-path: "@db-ui/base/build/assets/icons/", + $images-path: "@db-ui/base/build/assets/images/", + $fonts-path: "@db-ui/base/build/assets/fonts/" +); diff --git a/scss/_sass.assets-paths.scss b/scss/_sass.assets-paths.scss new file mode 100644 index 000000000..325f84e8f --- /dev/null +++ b/scss/_sass.assets-paths.scss @@ -0,0 +1,6 @@ +// If this library is used as an npm dependency, and the source files should be included rather than css, this corrects the paths. +@use "default.assets-paths" with ( + $icons-path: "~@db-ui/base/build/assets/icons/", + $images-path: "~@db-ui/base/build/assets/images/", + $fonts-path: "~@db-ui/base/build/assets/fonts/" +); diff --git a/scss/_webpack.assets-paths.scss b/scss/_webpack.assets-paths.scss deleted file mode 100644 index 02e7de82f..000000000 --- a/scss/_webpack.assets-paths.scss +++ /dev/null @@ -1,4 +0,0 @@ -// If this library is used as an npm dependency, and the source files should be included rather than css, this corrects the paths. -$icons-path: "~@db-ui/core/dist/icons/"; -$images-path: "~@db-ui/core/dist/images/"; -$fonts-path: "~@db-ui/core/dist/fonts/"; diff --git a/scss/icon/icons.scss b/scss/icon/icons.scss index f62140d27..a40f7e58a 100644 --- a/scss/icon/icons.scss +++ b/scss/icon/icons.scss @@ -1,11 +1,9 @@ -// @import "icons.variables"; - -@use "icons.variables" as *; -@use "icons.attributes-mappings" as *; @use "icons.helpers" as *; -@use "icons.custom-properties" as *; -@use "icons.font-faces" as *; +@use "icons.variables" as *; @use "icons.placeholder" as *; +@forward "icons.attributes-mappings"; +@forward "icons.custom-properties"; +@forward "icons.font-faces"; [data-icon], [data-icon-before] {