reuse project css less path folder hierarchy issue

简介: Question1580024800 - Internal Incident: Q2C/GM4: Issue in ‘Simulate sales pipeline’ app.

Question

1580024800 - Internal Incident: Q2C/GM4: Issue in ‘Simulate sales pipeline’ app.

I ran into a bit of problem while implementing the fix, my local eclipse maven build will fail if I change library.source.less the way you suggested, cause base.less and global.less don’t exist there (…/…/…/…/sap/ui/core/themes/sap_bluecrystal/base.less, eclipse error message pasted below), I’m wondering if there’s any way the solution could work with both server side and local environment? Thanks again for your help.


Caused by: org.mozilla.javascript.JavaScriptException: Error importing file:

JavaException: java.io.IOException: File not found: sap/cus/crm/sap/ui/core/themes/sap_bluecrystal/base.less (less-api.js#146)


In order to illustrate my point, here’s a screenshot with remarks for your kindly information.

image.png


Answer

the path in your error message looks not correct.

I think you need to add 3 additional occurrences of “…/” to navigate to the correct directory.


If your directory is:


sap/cus/crm/lib/reuse/themes/sap_bluecrystal


Your need to reference the base.less / global.less files via:



Then the path should be correctly resolved.

The same goes for your base theme which should reference the less files from sap/ui/core/themes/base/.


Question

it worked locally ! will it work on the server as well? Let me find it out J


// this works

@import “…/…/…/…/…/…/…/sap/ui/core/themes/base/base.less”;


// this does not work, find can’t be found cause there’s no sap_bluecrystal folder in the local core

@import “…/…/…/…/…/…/…/sap/ui/core/themes/sap_bluecrystal/base.less”;

image.png


Answer

the core „sap_bluecrystal“ theme is part of the „themelib_sap_bluecrystal” artefact.

You need to add this dependency to your “pom.xml” file:

image.png

<dependency>

<groupId>com.sap.ui5</groupId>

<artifactId>themelib_sap_bluecrystal</artifactId>

<version>{Same version as for your other dependencies, e.g. core}</version>

</dependency>


solution

为reuse lib inject了sap_bluecrystal them的dependency

image.png


第三步,我们reuse的代码(src/sap/cus/crm/lib/reuse/themes/sap_bluecrystal/library.source.less)中,加入了sap_bluecrystal jar包里面base.less和global.less两个style的引用

image.png

相关文章
|
前端开发
vuecli3打包报警告:chunk chunk-common [mini-css-extract-plugin] Conflicting order.
vuecli3打包报警告:chunk chunk-common [mini-css-extract-plugin] Conflicting order.
311 0
vuecli3打包报警告:chunk chunk-common [mini-css-extract-plugin] Conflicting order.
Get Files In Folder [ DTFolderFiles ] Plug-in description
Get Files In Folder [ DTFolderFiles ] Plug-in description
44 0
|
缓存 前端开发
[Css 修改后 Google浏览器上无效果] 文件上有:Generated source files should not be edited 的警告
[Css 修改后 Google浏览器上无效果] 文件上有:Generated source files should not be edited 的警告
241 0
[Css 修改后 Google浏览器上无效果] 文件上有:Generated source files should not be edited 的警告
|
前端开发 Java Maven
reuse project css less path folder hierarchy issue
reuse project css less path folder hierarchy issue
141 0
reuse project css less path folder hierarchy issue
|
前端开发 Windows
关于 SAP Spartacus feature library 里的 _index.scss 文件
关于 SAP Spartacus feature library 里的 _index.scss 文件
126 0
关于 SAP Spartacus feature library 里的 _index.scss 文件
Important table for launchpad Designer and configuration
Important table for launchpad Designer and configuration
125 0
Important table for launchpad Designer and configuration
Important table for Fiori launchpad Designer and configuration
Important table for Fiori launchpad Designer and configuration
116 0
Important table for Fiori launchpad Designer and configuration
- Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as t
vue.js报错如下: - Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as , as they will not be parsed.
5627 1