Skip to content

Commit

Permalink
Update deploy script.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Oct 19, 2021
1 parent cf37335 commit faa86c4
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 29 deletions.
52 changes: 52 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.DS_Store
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
.history
.editorconfig

# git
.gitignore
.gitattributes

# tests
test
coverage

# build tools
.travis.yml
.jenkins.yml
.codeclimate.yml

# linters
.jscsrc
.jshintrc
.eslintrc*

# vite configs
vite*.config*

# develop tool configs
.prettierrc
.eslintrc.js
.eslintignore
postcss.config.js
tsconfig.json

yarn.lock
package-lock.json

# local files
deploy
local
CNAME
index.html
#dist
File renamed without changes.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="./docs/banner-2021.png" alt="Artalk" width="100%">
<img src="https://user-images.githubusercontent.com/22412567/137740516-d9e97af0-fb3b-4dab-b331-671a9a2a3a63.png" alt="Artalk" width="100%">
</p>

# Artalk
Expand All @@ -14,7 +14,7 @@
[![](https://img.shields.io/github/license/ArtalkJS/Artalk.svg?style=flat-square)](./LICENSE)

## 特性
- 轻量简洁 (~23kB gzipped)
- 轻量简洁 (~30kB gzipped)
- 有趣有爱
- 自托管
- Markdown
Expand Down
Empty file removed docs/.nojekyll
Empty file.
2 changes: 0 additions & 2 deletions docs/README.md

This file was deleted.

Binary file removed docs/banner-2021.png
Binary file not shown.
Binary file removed docs/banner.png
Binary file not shown.
21 changes: 0 additions & 21 deletions docs/index.html

This file was deleted.

Binary file removed docs/logo-grey.png
Binary file not shown.
Binary file removed docs/logo.png
Binary file not shown.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
el: '#comments',
placeholder: '来啊,快活啊 ( ゜- ゜)',
defaultAvatar: 'mp',
pageKey: 'https://artalk-cn.qwqaq.com/',
pageKey: 'https://artalk.js.org/',
pageTitle: 'Artalk Home',
server: (location.hostname === 'localhost' || location.hostname === '127.0.0.1') ? 'http://localhost:23366/api' : './api',
server: (location.hostname === 'localhost' || location.hostname === '127.0.0.1') ? 'http://localhost:23366/api' : 'https://artalk.qwqaq.com/api',
site: 'ArtalkDemo',
readMore: {
pageSize: 15,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"serve": "vite preview",
"deploy": "gh-pages -d deploy",
"predeploy": "yarn run build && yarn run build:demo && yarn run copy:deploy",
"copy:deploy": "cp -r docs deploy && cp docs/CNAME deploy",
"copy:deploy": "cp -r dist deploy && cp CNAME deploy",
"lint": "eslint --ext .js,.ts src"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function CommonFetch(ctx: Context, input: RequestInfo, init: RequestInit): Promi
}
})
}))
} else if (json.data && json.data.need_login) {
} else if ((json.data && json.data.need_login) || resp.status === 401) {
// 请求需要管理员权限
json = await (new Promise<any>((resolve, reject) => {
ctx.dispatchEvent('checker-admin', {
Expand Down

0 comments on commit faa86c4

Please sign in to comment.