From 0a7acd8bf7597932bbf41494f8f08efd56321854 Mon Sep 17 00:00:00 2001 From: luanhewei Date: Thu, 9 Jul 2020 13:27:42 +0800 Subject: [PATCH] test(vuepress-theme-reco): add test script --- example/.vuepress/config.js | 1 + package.json | 1 + scripts/test.sh | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 scripts/test.sh diff --git a/example/.vuepress/config.js b/example/.vuepress/config.js index c19a1e1..30e74f2 100644 --- a/example/.vuepress/config.js +++ b/example/.vuepress/config.js @@ -6,6 +6,7 @@ module.exports = { ['link', { rel: 'icon', href: '/favicon.ico' }], ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }] ], + base: '/reco-example-test/', // theme: 'reco', theme: require.resolve('../../packages/vuepress-theme-reco'), themeConfig: { diff --git a/package.json b/package.json index a3511ab..1185faa 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "prepublish": "lerna publish --dist-tag next", "publish": "lerna publish", "push": "yarn commit && git push", + "test": "bash scripts/test.sh", "update": "yarn upgrade-interactive --latest" }, "husky": { diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100644 index 0000000..1f1f8ad --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,14 @@ +npm run build + +cd example/public + +git init +git add -A +date=`date +%Y-%m-%d_%H:%M:%S` +git commit -m "deploy ${date}" + +git push -f git@gitee.com:recoluan/reco-example-test.git master + +cd ../../ +rm -rf example/public +