Compare commits

...

10 Commits

Author SHA1 Message Date
chenjiahan
ffb819181a dcos: update changelog 2022-07-17 16:08:27 +08:00
chenjiahan
ce6c2a240f chore: release @vant/cli@2.11.11 2022-07-17 16:06:55 +08:00
chenjiahan
107511aa54 docs: fix 2022-07-17 16:06:38 +08:00
chenjiahan
c4398dfa82 chore: release @vant/cli@2.11.10 2022-07-17 16:02:26 +08:00
chenjiahan
1817a43aa9 chore: fix 2022-07-17 16:02:02 +08:00
chenjiahan
f3413d39e0 chore: release @vant/cli@2.11.9 2022-07-17 15:59:22 +08:00
chenjiahan
9d187add3d chore: changelog 2022-07-17 15:59:01 +08:00
chenjiahan
219c2d04d8 chore: release @vant/cli@2.11.8 2022-07-17 15:54:08 +08:00
chenjiahan
d4ab4214ef feat(cli): add site.headHtml option 2022-07-17 15:53:43 +08:00
chenjiahan
27c3cbcf89 chore: support manually trigger deploy v2 site 2022-07-17 15:48:54 +08:00
9 changed files with 29 additions and 6 deletions

View File

@ -6,6 +6,8 @@ on:
paths:
- 'docs/**'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest

View File

@ -66,7 +66,7 @@
"vue": ">= 2.6.0"
},
"devDependencies": {
"@vant/cli": "^2.11.7",
"@vant/cli": "^2.11.11",
"prettier": "2.1.0",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"

View File

@ -1,5 +1,11 @@
# 更新日志
## v2.11.8 ~ 2.11.11
`2022-07-17`
- 新增 `site.headHtml` 配置项
## v2.11.7
`2022-05-28`

View File

@ -1,6 +1,6 @@
{
"name": "@vant/cli",
"version": "2.11.7",
"version": "2.11.11",
"description": "",
"main": "lib/index.js",
"typings": "lib/index.d.ts",

View File

@ -19,6 +19,9 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<% if (htmlWebpackPlugin.options.headHtml) { %>
<%= htmlWebpackPlugin.options.headHtml %>
<% } %>
<% if (htmlWebpackPlugin.options.usingSearch) { %>
<link
href="https://fastly.jsdelivr.net/docsearch.js/2/docsearch.min.css"

View File

@ -19,6 +19,9 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<% if (htmlWebpackPlugin.options.headHtml) { %>
<%= htmlWebpackPlugin.options.headHtml %>
<% } %>
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
<script>
// avoid to load analytics in iframe

View File

@ -15,6 +15,7 @@ import {
export function getSiteDevBaseConfig(): WebpackConfig {
const vantConfig = getVantConfig();
const headHtml = get(vantConfig, 'site.headHtml');
const baiduAnalytics = get(vantConfig, 'site.baiduAnalytics');
function getSiteConfig() {
@ -89,6 +90,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
chunks: ['chunks', 'site-desktop'],
template: join(__dirname, '../../site/desktop/index.html'),
filename: 'index.html',
headHtml,
baiduAnalytics,
...htmlPluginOptions,
}),
@ -99,6 +101,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
chunks: ['chunks', 'site-mobile'],
template: join(__dirname, '../../site/mobile/index.html'),
filename: 'mobile.html',
headHtml,
baiduAnalytics,
...htmlPluginOptions,
}),

View File

@ -19,6 +19,12 @@ module.exports = {
baiduAnalytics: {
seed: 'ad6b5732c36321f2dafed737ac2da92f',
},
headHtml: `<script>
if (location.host === 'youzan.github.io') {
location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
}
</script>
`,
htmlPluginOptions: {
meta: {
'docsearch:version': 'v2',

View File

@ -1684,10 +1684,10 @@
semver "^6.3.0"
tsutils "^3.17.1"
"@vant/cli@^2.11.7":
version "2.11.7"
resolved "https://registry.npmjs.org/@vant/cli/-/cli-2.11.7.tgz#24742903b0ccbaaddaef5fd9fdad04f749103910"
integrity sha512-x9tgHaYfz1Pbi80C3vvgmobpLgHA3V5934/7Xqpz7gmrjSK0z+Qojx/eOioi9xS9pS655j1nbw5pPzz5+5Y/Xw==
"@vant/cli@^2.11.11":
version "2.11.11"
resolved "https://registry.npmjs.org/@vant/cli/-/cli-2.11.11.tgz#cd6877b2721df6a4d8ce932a8fc1c28bee63faad"
integrity sha512-zPuER5XeZCXYRhB1g029T9Et4Uvit2mTcD23e3VXdd1oL99bG8JoiQa8ImzzsH32sPWdNAUYFwGO1gDZXgOEWA==
dependencies:
"@babel/core" "^7.10.1"
"@babel/plugin-syntax-jsx" "^7.10.1"