test(vuepress-theme-reco): add test script

This commit is contained in:
luanhewei 2020-07-09 13:27:42 +08:00
parent c8ee569671
commit 0a7acd8bf7
3 changed files with 16 additions and 0 deletions

View File

@ -6,6 +6,7 @@ module.exports = {
['link', { rel: 'icon', href: '/favicon.ico' }], ['link', { rel: 'icon', href: '/favicon.ico' }],
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }] ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
], ],
base: '/reco-example-test/',
// theme: 'reco', // theme: 'reco',
theme: require.resolve('../../packages/vuepress-theme-reco'), theme: require.resolve('../../packages/vuepress-theme-reco'),
themeConfig: { themeConfig: {

View File

@ -18,6 +18,7 @@
"prepublish": "lerna publish --dist-tag next", "prepublish": "lerna publish --dist-tag next",
"publish": "lerna publish", "publish": "lerna publish",
"push": "yarn commit && git push", "push": "yarn commit && git push",
"test": "bash scripts/test.sh",
"update": "yarn upgrade-interactive --latest" "update": "yarn upgrade-interactive --latest"
}, },
"husky": { "husky": {

14
scripts/test.sh Normal file
View File

@ -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