Skip to content

Commit

Permalink
patch: header update
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Mar 26, 2024
1 parent da8013f commit 413ed1c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,26 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # 如果不配置将影响publish

# 修改package.json版本号, 修改后提交到仓库
- name: Bump version and push to GitHub
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GIT_ACTION }}
with:
# minor-wording: 'add,Adds,new'
# major-wording: 'MAJOR,cut-major'
patch-wording: 'patch,fixes' # Providing patch-wording will override commits
# patch-wording: 'feat,release' # Providing patch-wording will override commits
# defaulting to a patch bump.
# rc-wording: 'RELEASE,alpha'

- run: npm install
# - run: npm run build # npm publish的时候会自动执行 prepublishOnly 脚本(package.json)

- name: publish # 向npm publish 代码 请遵循npm规范.
- name: Publish to NPM
run: npm publish || true
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} # 该token是 npm的token 获取npm token请查看 步骤2 的创建 npm token 和 将npm token 放入github的 secrets下
run: npm publish
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# 到这如果全部成功,那么我们就成功的将代码发布到了npm

# 下面主要是创建 github 的release
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ https://www.npmjs.com/package/quark-doc-header
![1685501041275](https://github.com/hellof2e/quark-doc-header/assets/14307551/1c48d6ec-913d-485a-971c-aa071327e151)
![2](https://github.com/hellof2e/quark-doc-header/assets/14307551/c1da40c5-53a0-4620-90f7-83def24b7167)

该组件同时被被使用在:

- https://quarkc.hellobike.com
- https://vue-quarkd.hellobike.com
- https://react-quarkd.hellobike.com
- https://vanilla-quarkd.hellobike.com
- https://angular-quarkd.hellobike.com
- https://svelte-quarkd.hellobike.com

## 如何使用

Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MyComponent extends QuarkElement {
this.#ecosystemLangs = this.#isZhLang ? langs["zh-CN"] : langs["en-US"]
this.#curHost = location.origin // e.g. https://vue-quarkd.hellobike.com
this.#isDocNotReady = false
this.#isQuarkc = location.host.indexOf('quarkc.hellobike.com') > -1 ? true : false
this.#isQuarkc = location.pathname.indexOf('quarkc-docs') > -1 ? true : false
this.#techName = location.pathname.split('/')[2]

if(~['vanilla', 'angular', 'svelte'].indexOf(location.hostname.split('-')[0])) {
Expand Down

0 comments on commit 413ed1c

Please sign in to comment.