前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >从丁哥那里学到的两个UI5技能

从丁哥那里学到的两个UI5技能

作者头像
Jerry Wang
发布2019-05-29 22:37:25
4120
发布2019-05-29 22:37:25
举报

版权声明:本文为博主汪子熙原创文章,未经博主允许不得转载。 https://cloud.tencent.com/developer/article/1438648

sapui5.runtime\src\framework_core\target\classes\META-INF\resources\sap-ui-core.js

Line 14925 ->

代码语言:javascript
复制
            /**
            * Determine whether to use debug sources depending on URL parameter and local storage
            * and load debug library if necessary
            */
代码语言:javascript
复制
                (function() {
                                //Check URI param
                                var bDebugSources = /sap-ui-debug=(true|x|X)/.test(location.search),
                                                bIsOptimized = window["sap-ui-optimized"];
 
                                //Check local storage
                                try { //Necessary for FF when Cookies are deactivated
                                                bDebugSources = bDebugSources || (window.localStorage.getItem("sap-ui-debug") == "X");
                                } catch (e) {}
 
                                window["sap-ui-debug"] = bDebugSources;
 
                                // if bootstap URL already contains -dbg URL, just set sap-ui-loaddbg
                                if (/-dbg\.js([?#]|$)/.test(_oBootstrap.url)) {
                                                window["sap-ui-loaddbg"] = true;
                                                window["sap-ui-debug"] = true;
                                }
 
                                // if current sources are optimized and debug sources are wanted, restart with debug URL
                                if (bIsOptimized && bDebugSources) {
                                                var sDebugUrl = _oBootstrap.url.replace(/\/(?:sap-ui-cachebuster\/)?([^\/]+)\.js/, "/$1-dbg.js");
                                                window["sap-ui-optimized"] = false;
                                                window["sap-ui-loaddbg"] = true;
                                                document.write("<script type=\"text/javascript\" src=\"" + sDebugUrl + "\"></script>");
                                                var oRestart = new Error("Aborting UI5 bootstrap and restarting from: " + sDebugUrl);
                                                oRestart.name = "Restart";
                                                throw oRestart;
                                }
                })();
 
Sap-ui-core.js is merged from sapui5.runtime\src\framework\_core\target\classes\META-INF\maven\com.sap.openui5\sap.ui.core\pom.xml  
<echo>Merging module: sap-ui-core.js</echo>
                concat destfile="${project.build.outputDirectory}/META-INF/resources/sap-ui-core.js" overwrite="true" encoding="UTF-8" eol="lf" fixlastline="true">
                                                                                                                                                <filelist dir="${project.build.outputDirectory}/META-INF/resources/">
                                                                                                                                                                <file name="sap/ui/thirdparty/jquery/jquery-1.11.1.js"/>
                                                                                                                                                                <file name="sap/ui/thirdparty/jqueryui/jquery-ui-position.js"/>
                                                                                                                                                                <file name="sap/ui/Device.js"/>
                                                                                                                                                                <file name="sap/ui/thirdparty/URI.js"/>
                                                                                                                                                                <file name="jquery.sap.promise.js"/>
                                                                                                                                                                <file name="jquery.sap.global.js"/>
                                                                                                                                                </filelist>
                                                                                                                                </concat>
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年05月18日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档