Skip to content

Commit

Permalink
workflow: move link check to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 11, 2018
1 parent b4770d0 commit c427314
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- attach_workspace:
at: ~/
- run: yarn lint
- run: yarn check-links
- run: yarn test -p cli-service-global,eslint,pwa,babel,babel-preset-app

group-4:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"docs:build": "vuepress build docs"
},
"gitHooks": {
"pre-commit": "lint-staged && yarn run check-links",
"pre-commit": "lint-staged",
"commit-msg": "node scripts/verifyCommitMsg.js"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function checkLink (file, link, n) {
if (result.statusCode !== 200) {
throw new Error('error')
} else {
// console.log('[OK]', link, result.statusCode)
console.log('[OK]', link, result.statusCode)
}
} catch (e) {
console.warn('[!!]', link, `${file}:${parseInt(n) + 1}`)
Expand Down

0 comments on commit c427314

Please sign in to comment.