Skip to content

Commit

Permalink
[chore] add prettier-plugin-sh
Browse files Browse the repository at this point in the history
  • Loading branch information
wangrunlin committed Feb 6, 2024
1 parent 255f30b commit 032b40d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 13 deletions.
18 changes: 7 additions & 11 deletions pack-docs.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# generate multilingual file
for file in ReadMe-*.md; do
typedoc --readme $file

typedoc --readme $file

mv docs/index.html ${file%.md}.html

mv docs/index.html ${file%.md}.html
done

# generate docs
typedoc source/

# copy html file to docs folder, replace link
for file in ReadMe-*.html; do
# example: mv ReadMe-zh.html docs/zh.html
mv $file docs/"${file#ReadMe-}"

# example: mv ReadMe-zh.html docs/zh.html
mv $file docs/"${file#ReadMe-}"

# example: replace ReadMe-zh.md zh.html
replace "./${file%.html}.md" "./${file#ReadMe-}" docs/*.html

done
# example: replace ReadMe-zh.md zh.html
replace "./${file%.html}.md" "./${file#ReadMe-}" docs/*.html
done
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"open-cli": "^8.0.0",
"parcel": "~2.11.0",
"prettier": "^3.2.4",
"prettier-plugin-sh": "^0.14.0",
"replace": "^1.2.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
Expand All @@ -80,14 +81,17 @@
"prepublishOnly": "npm test && npm run build"
},
"lint-staged": {
"*.{md,json,yml,js,ts,tsx}": "prettier --write",
"*.{md,json,yml,js,ts,tsx,sh}": "prettier --write",
"*.{js,ts,tsx}": "eslint --fix"
},
"prettier": {
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"tabWidth": 4
"tabWidth": 4,
"plugins": [
"prettier-plugin-sh"
]
},
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
"targets": {
Expand Down
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 032b40d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for web-cell ready!

✅ Preview
https://web-cell-i2jrlz7ee-techquery.vercel.app

Built with commit 032b40d.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.