config.js 多人同步更新 解决方案 多项目公用一套config.js dev
index.html
<script type='text/javascript' src='<%= BASE_URL %>config.js?${Math.random().toString(36).substr(2)}'></script>
<% if (process.env.NODE_ENV === 'development') { %>
<script>
console.info('window.location.hostname', window.location.hostname)
var oHead = document.getElementsByTagName('head')[0]; // 在head标签中创建创建script
var oScript = document.createElement("script");
oScript.type = "text/javascript";
var rootDirectory = "<%= BASE_URL %>"
// var rootDirectory = "/your_web/"
oScript.src = rootDirectory + "configDev/configjs" + window.location.hostname + ".js?${Math.random().toString(36).substr(2)}";
oHead.appendChild(oScript);
</script>
<% } %>
思路:
config.js 多人同步更新 解决方案
多人提交git config总会被覆盖,调试时候,用ip作为文件名,这样后置盖回来就解决多人同步更新config的问题了。
多项目公用一套config.js dev
将平台的二次加载地址,不用自己的,用另一个项目的加载地址即可 改 rootDirectory
---------------------------------------------
生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!
https://pengchenggang.gitee.io/navigator/
SMART原则:
目标必须是具体的(Specific)
目标必须是可以衡量的(Measurable)
目标必须是可以达到的(Attainable)
目标必须和其他目标具有相关性(Relevant)
目标必须具有明确的截止期限(Time-based)
生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!
https://pengchenggang.gitee.io/navigator/
SMART原则:
目标必须是具体的(Specific)
目标必须是可以衡量的(Measurable)
目标必须是可以达到的(Attainable)
目标必须和其他目标具有相关性(Relevant)
目标必须具有明确的截止期限(Time-based)