
获得徽章 8
export PATH=/usr/local/node-v20.17.0/bin:$PATH
export NPM_CONFIG_CACHE=/opt/ci-cache/npm
npm set cache "$NPM_CONFIG_CACHE"
export XDG_CACHE_HOME=/opt/ci-cache/node_modules_cache
npm set audit false
npm set fund false
npm set progress false
npm set registry
registry.npmmirror.com
if [ -f package-lock.json ]; then
npm ci --ignore-scripts --loglevel=error
else
npm install --ignore-scripts --loglevel=error
fi
npm run build:${ENV}
前端cicd构建优化
export NPM_CONFIG_CACHE=/opt/ci-cache/npm
npm set cache "$NPM_CONFIG_CACHE"
export XDG_CACHE_HOME=/opt/ci-cache/node_modules_cache
npm set audit false
npm set fund false
npm set progress false
npm set registry
if [ -f package-lock.json ]; then
npm ci --ignore-scripts --loglevel=error
else
npm install --ignore-scripts --loglevel=error
fi
npm run build:${ENV}
前端cicd构建优化
展开
评论
点赞
赞了这篇文章
代码提交错了分支,甚至不知道在哪个分支提交的,通过下述方式找回并切到正确分支:
找分支: git log --all --grep="提交的关键词" --oneline
切换到对应的分支:git cherry-pick abc123
找分支: git log --all --grep="提交的关键词" --oneline
切换到对应的分支:git cherry-pick abc123
评论
点赞
<script setup>
import { ref, onMounted } from 'vue'
const list = ref([
/* ... */
])
const itemRefs = ref([])
onMounted(() => console.log(itemRefs.value))
</script>
<template>
<ul>
<li v-for="item in list" ref="itemRefs">
{{ item }}
</li>
</ul>
</template>
itemRefs原来有数组的用法
import { ref, onMounted } from 'vue'
const list = ref([
/* ... */
])
const itemRefs = ref([])
onMounted(() => console.log(itemRefs.value))
</script>
<template>
<ul>
<li v-for="item in list" ref="itemRefs">
{{ item }}
</li>
</ul>
</template>
itemRefs原来有数组的用法
展开
1
1
lock文件丢失情况下,node14.19.1 umi "@ant-design/pro-components": "^2.6.8" 打包异常, 使用npm ls path-to-regexp查看到path-to-regexp版本不一致导致。
最终写死版本"@ant-design/pro-components": "2.7.1"可解决
最终写死版本"@ant-design/pro-components": "2.7.1"可解决
评论
2
在vue2中this.$route.params与this.$route.query的区别:
this.$router.push({ path: '/user/123', query: { id: 456 } });
this.$router.push({ path: '/user/123', query: { id: 456 } });
3
点赞
b.example.com中,
主机(Host):b.example.com
子域(Subdomain):b
主域(Domain):example.com
顶级域(TLD):.com
主机(Host):b.example.com
子域(Subdomain):b
主域(Domain):example.com
顶级域(TLD):.com
1
点赞
提供一个axure原型在谷歌浏览器无法预览的简单解决方案:
在产品给你的原型图内,找到resources-chorme,将axure-chrome-extension.crx改成rar,解压后直接在拓展文件加载已解压文件夹,搞定。
在产品给你的原型图内,找到resources-chorme,将axure-chrome-extension.crx改成rar,解压后直接在拓展文件加载已解压文件夹,搞定。
评论
2
set $group "default";
if ($http_cookie ~* "version=1.0"){
set $group version1.0_server;
}
if ($http_cookie ~* "version=2.0"){
set $group version2.0_server;
}
location /api {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://$group;
}
location /static{
proxy_pass https://$group.com;
}
一套简单的灰度
if ($http_cookie ~* "version=1.0"){
set $group version1.0_server;
}
if ($http_cookie ~* "version=2.0"){
set $group version2.0_server;
}
location /api {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://$group;
}
location /static{
proxy_pass https://$group.com;
}
一套简单的灰度
展开
评论
点赞