create-blocklet 0.4.45 → 0.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/.github/workflows/pr-title.yml +21 -0
- package/common/.github/workflows/version-check.yml +20 -0
- package/common/.makefiles/bump_version.sh +1 -2
- package/common/public/favicon.ico +0 -0
- package/index.js +7 -6
- package/package.json +5 -5
- package/templates/blocklet-page-static/.blocklet-pages/config.yml +7 -0
- package/templates/blocklet-page-static/.blocklet-pages/layouts/MyLayout.mdx +11 -0
- package/templates/blocklet-page-static/.blocklet-pages/layouts/images/logo.png +0 -0
- package/templates/blocklet-page-static/README.md +1 -143
- package/templates/blocklet-page-static/blocklet.yml +19 -0
- package/templates/blocklet-page-static/package.json +3 -2
- package/templates/blocklet-page-static/pages/index.mdx +29 -0
- package/templates/blocklet-page-static/pages/index.zh.mdx +28 -0
- package/templates/doc-site-static/.blocklet-pages/config.yml +23 -0
- package/templates/doc-site-static/.blocklet-pages/layouts/Documentation.mdx +7 -0
- package/templates/doc-site-static/.blocklet-pages/layouts/images/logo.png +0 -0
- package/templates/doc-site-static/README.md +0 -0
- package/templates/doc-site-static/blocklet.md +3 -0
- package/templates/doc-site-static/blocklet.yml +61 -0
- package/templates/doc-site-static/package.json +17 -0
- package/templates/doc-site-static/pages/index.mdx +6 -0
- package/templates/doc-site-static/pages/index.zh.mdx +6 -0
- package/templates/doc-site-static/pages/intro/index.mdx +28 -0
- package/templates/doc-site-static/pages/intro/index.zh.mdx +28 -0
- package/templates/express-api/.eslintrc.js +22 -0
- package/templates/express-api/package.json +21 -4
- package/templates/nextjs-dapp/package.json +5 -5
- package/templates/react-dapp/api/index.js +1 -1
- package/templates/react-dapp/craco.config.js +6 -3
- package/templates/react-dapp/package.json +8 -8
- package/templates/react-gun-dapp/api/index.js +1 -1
- package/templates/react-gun-dapp/package.json +7 -7
- package/templates/react-static/package.json +2 -2
- package/templates/solidjs-dapp/api/index.js +1 -1
- package/templates/solidjs-dapp/package.json +8 -8
- package/templates/solidjs-static/package.json +3 -3
- package/templates/svelte-dapp/api/index.js +1 -1
- package/templates/svelte-dapp/package.json +8 -7
- package/templates/svelte-static/package.json +2 -2
- package/templates/vue-dapp/api/index.js +1 -1
- package/templates/vue-dapp/package.json +8 -8
- package/templates/vue-static/package.json +3 -3
- package/templates/vue2-dapp/api/index.js +1 -1
- package/templates/vue2-dapp/package.json +9 -9
- package/templates/vue2-static/package.json +4 -4
- package/templates/blocklet-page-static/.blocklet-page/blocks/CustomBlock.mdx +0 -3
- package/templates/blocklet-page-static/.blocklet-page/composes/MyLayout.mdx +0 -7
- package/templates/blocklet-page-static/.blocklet-page/config.yml +0 -3
- package/templates/blocklet-page-static/pages/index.md +0 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: 'Lint PR Title'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- dev
|
|
13
|
+
- master
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint-title:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: ArcBlock/action-lint-pull-request-title@master
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: 'Version Check'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
jobs:
|
|
14
|
+
main:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: action-version-check
|
|
18
|
+
uses: arcblock/action-version-check@master
|
|
19
|
+
env:
|
|
20
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -28,8 +28,7 @@ if [ -f $VERSION ]; then
|
|
|
28
28
|
V_PATCH=${BASE_LIST[2]}
|
|
29
29
|
echo -e "${NOTICE_FLAG} Current version: ${WHITE}$BASE_STRING"
|
|
30
30
|
echo -e "${NOTICE_FLAG} Latest commit hash: ${WHITE}$LATEST_HASH"
|
|
31
|
-
|
|
32
|
-
V_PATCH=0
|
|
31
|
+
V_PATCH=$((V_PATCH + 1))
|
|
33
32
|
SUGGESTED_VERSION="$V_MAJOR.$V_MINOR.$V_PATCH"
|
|
34
33
|
echo -ne "${QUESTION_FLAG} ${CYAN}Enter a version number [${WHITE}$SUGGESTED_VERSION${CYAN}]: "
|
|
35
34
|
read INPUT_STRING
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -99,6 +99,11 @@ const TYPES = [
|
|
|
99
99
|
display: 'blocklet page',
|
|
100
100
|
color: blue,
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: 'doc-site',
|
|
104
|
+
display: 'doc site',
|
|
105
|
+
color: blue,
|
|
106
|
+
},
|
|
102
107
|
{
|
|
103
108
|
name: 'html',
|
|
104
109
|
display: 'html',
|
|
@@ -272,15 +277,11 @@ async function init() {
|
|
|
272
277
|
const commonDir = path.join(__dirname, 'common');
|
|
273
278
|
const commonFiles = fs.readdirSync(commonDir);
|
|
274
279
|
for (const file of commonFiles) {
|
|
275
|
-
if (!['react', 'react-gun'].includes(framework) && file === '_eslintrc.js') {
|
|
276
|
-
// eslint-disable-next-line no-continue
|
|
277
|
-
continue;
|
|
278
|
-
}
|
|
279
|
-
if (framework === 'blocklet-page' && ['_eslintignore', '.husky'].includes(file)) {
|
|
280
|
+
if (!['react', 'react-gun',].includes(framework) && file === '_eslintrc.js') {
|
|
280
281
|
// eslint-disable-next-line no-continue
|
|
281
282
|
continue;
|
|
282
283
|
}
|
|
283
|
-
if (
|
|
284
|
+
if (['blocklet-page','doc-site'].includes(framework) && ['_eslintignore', '.husky'].includes(file)) {
|
|
284
285
|
// eslint-disable-next-line no-continue
|
|
285
286
|
continue;
|
|
286
287
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-blocklet",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.48",
|
|
4
4
|
"exports": "./index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "git@github.com:blocklet/create-blocklet.git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"test:run": "vitest run"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@arcblock/did": "^1.17.
|
|
33
|
-
"@ocap/mcrypto": "^1.17.
|
|
34
|
-
"@ocap/util": "^1.17.
|
|
32
|
+
"@arcblock/did": "^1.17.16",
|
|
33
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
34
|
+
"@ocap/util": "^1.17.16",
|
|
35
35
|
"boxen": "^6.2.1",
|
|
36
36
|
"ejs": "^3.1.8",
|
|
37
37
|
"envfile": "^6.17.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@arcblock/eslint-config-base": "0.2.2",
|
|
50
|
-
"eslint": "^8.
|
|
50
|
+
"eslint": "^8.23.0",
|
|
51
51
|
"prettier": "^2.7.1",
|
|
52
52
|
"vitest": "^0.19.1"
|
|
53
53
|
}
|
|
@@ -1,143 +1 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
This project was bootstrapped with [Create Blocklet](https://github.com/blocklet/create-blocklet).
|
|
4
|
-
|
|
5
|
-
This blocklet is a static project, which means this is a frontend application. It's contained `client` code.
|
|
6
|
-
|
|
7
|
-
## File Structure
|
|
8
|
-
|
|
9
|
-
- public/ - static files
|
|
10
|
-
- favicon.ico - favicon
|
|
11
|
-
- favicon.svg - favicon
|
|
12
|
-
- screenshots/ - Screenshots
|
|
13
|
-
- site/ - Client side code (A standard Blocklet Page project)
|
|
14
|
-
- .gitignore - Git ignore file
|
|
15
|
-
- .prettierrc - Prettier configuration
|
|
16
|
-
- blocklet.md - Blocklet README
|
|
17
|
-
- blocklet.yml - Blocklet configuration
|
|
18
|
-
- LICENSE - License file
|
|
19
|
-
- logo.png - Blocklet logo file
|
|
20
|
-
- Makefile - Makefile
|
|
21
|
-
- package.json - Npm package file
|
|
22
|
-
- README.md - A guide for this blocklet
|
|
23
|
-
- version - Version file
|
|
24
|
-
|
|
25
|
-
## Development
|
|
26
|
-
|
|
27
|
-
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
28
|
-
|
|
29
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
30
|
-
`npm install -g @blocklet/cli`
|
|
31
|
-
See details in [https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#use-the-binary-distribution](https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#use-the-binary-distribution)
|
|
32
|
-
|
|
33
|
-
2. Init blocklet server & start blocklet server
|
|
34
|
-
|
|
35
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
36
|
-
`blocklet server init --mode=debug`
|
|
37
|
-
`blocklet server start`
|
|
38
|
-
See details in [https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#configure-abt-node](https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#configure-abt-node)
|
|
39
|
-
|
|
40
|
-
3. Go to the project directory `cd [name]`
|
|
41
|
-
4. Install dependencies: `npm install` or `yarn` or `pnpm`
|
|
42
|
-
5. Start development server: `blocklet dev`
|
|
43
|
-
|
|
44
|
-
## Bundle
|
|
45
|
-
|
|
46
|
-
After developing a blocklet, you may need to bundle it. Use `npm run bundle` command.
|
|
47
|
-
|
|
48
|
-
## Deploy
|
|
49
|
-
|
|
50
|
-
- If you want to deploy this blocklet to local blocklet server, you can use `blocklet deploy .blocklet/bundle` command(Make sure the blocklet is bundled before deployment.)
|
|
51
|
-
> Or you can simply use `npm run deploy` command.
|
|
52
|
-
- If you want to deploy this blocklet to remote blocklet server, you can use the command below.
|
|
53
|
-
|
|
54
|
-
```shell
|
|
55
|
-
blocklet deploy .blocklet/bundle --endpoint {your blocklet server url} --access-key {blocklet server access key} --access-secret {blocklet server access secret}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
> Make sure the blocklet is bundled before deployment.
|
|
59
|
-
|
|
60
|
-
## Upload to blocklet store
|
|
61
|
-
|
|
62
|
-
- If you want to upload the blocklet to any store for other users to download and use, you can following the following instructions.
|
|
63
|
-
|
|
64
|
-
Bump version at first.
|
|
65
|
-
|
|
66
|
-
```shell
|
|
67
|
-
make bump-version
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Then config blocklet store url.
|
|
71
|
-
You can use those store url in below.
|
|
72
|
-
|
|
73
|
-
1. [https://store.blocklet.dev/](https://store.blocklet.dev/)
|
|
74
|
-
2. [https://dev.store.blocklet.dev/](https://dev.store.blocklet.dev/)
|
|
75
|
-
3. A blocklet store started by yourself.
|
|
76
|
-
> Make sure you have installed a `blocklet store` on your own blocklet server. Check it on here: [https://store.blocklet.dev/blocklet/z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ](https://store.blocklet.dev/blocklet/z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ)
|
|
77
|
-
|
|
78
|
-
```shell
|
|
79
|
-
blocklet config set store {store url}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Get a `accessToken` from blocklet store.
|
|
83
|
-
|
|
84
|
-
> Why we need a `accessToken`?
|
|
85
|
-
> A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
|
|
86
|
-
|
|
87
|
-
Set `accessToken` to blocklet config
|
|
88
|
-
|
|
89
|
-
```shell
|
|
90
|
-
blocklet config set accessToken {accessToken}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Upload a new version to a store.
|
|
94
|
-
|
|
95
|
-
> Make sure the blocklet is bundled before upload.
|
|
96
|
-
|
|
97
|
-
```shell
|
|
98
|
-
blocklet upload
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Or you can simply use `npm run upload` command.
|
|
102
|
-
|
|
103
|
-
- You also can upload a new version to blocklet store by Github CI.
|
|
104
|
-
Bump version at first.
|
|
105
|
-
|
|
106
|
-
```shell
|
|
107
|
-
make bump-version
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
111
|
-
The CI workflow will automatically upload a new version to a store.
|
|
112
|
-
|
|
113
|
-
## Q & A
|
|
114
|
-
|
|
115
|
-
1. Q: How to change a blocklet's name?
|
|
116
|
-
|
|
117
|
-
A: Change the `name` field in the `package.json` file, change the `name` field in the `blocklet.yml` file.
|
|
118
|
-
|
|
119
|
-
You can also change the `title` field and `description` field in the `blocklet.yml` file.
|
|
120
|
-
|
|
121
|
-
Run `blocklet meta` command, you will get a `did` config, copy the `did` value.
|
|
122
|
-
|
|
123
|
-
Replace this command `"bundle": "PUBLIC_URL='/.blocklet/proxy/{did}' npm run build",` in `package.json`
|
|
124
|
-
|
|
125
|
-
Replace `did` field in the `blocklet.yml`
|
|
126
|
-
|
|
127
|
-
2. Q: How to change a blocklet's logo?
|
|
128
|
-
|
|
129
|
-
Change the `logo.png` file root folder.
|
|
130
|
-
|
|
131
|
-
Or you can change the `logo` field in the `blocklet.yml` file.
|
|
132
|
-
|
|
133
|
-
> Make sure you have added the logo path to the `blocklet.yml` file `files` field.
|
|
134
|
-
|
|
135
|
-
## Learn More
|
|
136
|
-
|
|
137
|
-
- Full specification of `blocklet.yml`: [https://github.com/blocklet/blocklet-specification/blob/main/docs/meta.md](https://github.com/blocklet/blocklet-specification/blob/main/docs/meta.md)
|
|
138
|
-
- Full document of Blocklet Server & blocklet development: [https://docs.arcblock.io/abtnode/en/introduction](https://docs.arcblock.io/abtnode/en/introduction)
|
|
139
|
-
|
|
140
|
-
## License
|
|
141
|
-
|
|
142
|
-
The code is licensed under the Apache 2.0 license found in the
|
|
143
|
-
[LICENSE](LICENSE) file.
|
|
1
|
+
# Blocklet Pages Site
|
|
@@ -46,3 +46,22 @@ environments: []
|
|
|
46
46
|
capabilities: {}
|
|
47
47
|
screenshots: []
|
|
48
48
|
children: []
|
|
49
|
+
navigation:
|
|
50
|
+
- title:
|
|
51
|
+
en: ArcBlock
|
|
52
|
+
zh: ArcBlock
|
|
53
|
+
link:
|
|
54
|
+
en: https://www.arcblock.io/en/
|
|
55
|
+
zh: https://www.arcblock.io/zh/
|
|
56
|
+
- title:
|
|
57
|
+
en: Resources
|
|
58
|
+
zh: 资源
|
|
59
|
+
items:
|
|
60
|
+
- title:
|
|
61
|
+
en: Blocklet Platform
|
|
62
|
+
zh: Blocklet 平台
|
|
63
|
+
link: https://www.blocklet.io
|
|
64
|
+
- title:
|
|
65
|
+
en: Blocklet Developer
|
|
66
|
+
zh: Blocklet 开发者
|
|
67
|
+
link: https://developer.blocklet.io
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev",
|
|
6
6
|
"start": "xmark start",
|
|
7
|
-
"clean": "rm -rf .blocklet",
|
|
7
|
+
"clean": "rm -rf .blocklet && rm -rf node_modules/.vite",
|
|
8
|
+
"build": "xmark build --base=/",
|
|
8
9
|
"bundle": "npm run clean && xmark build && blocklet bundle --create-release",
|
|
9
10
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
10
11
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
|
-
"@xmark/cli": "^2.4.
|
|
14
|
+
"@xmark/cli": "^2.4.36"
|
|
14
15
|
}
|
|
15
16
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: 'my-layout'
|
|
3
|
+
blocks:
|
|
4
|
+
- name: SectionHero
|
|
5
|
+
title: What is this?
|
|
6
|
+
description: !md
|
|
7
|
+
This is a web site powered by [Blocklet Pages](https://pages.blocklet.io), a flexible content authoring system that supports both product pages and documentation pages.
|
|
8
|
+
actions:
|
|
9
|
+
- name: Button
|
|
10
|
+
children: Learn More
|
|
11
|
+
variant: contained
|
|
12
|
+
href: https://pages.blocklet.io
|
|
13
|
+
- name: SectionAccordionList
|
|
14
|
+
title: How to update this site?
|
|
15
|
+
description: You can quickly update this site by tweaking files or replacing images.
|
|
16
|
+
list:
|
|
17
|
+
- title: Update website config
|
|
18
|
+
description: You can update `.blocklet-page/config.yml` by changing the name and description of this website.
|
|
19
|
+
- title: Update website logo
|
|
20
|
+
description: You can replace `.blocklet-page/composes/images/logo.png` to update the logo for this website.
|
|
21
|
+
- title: Update this page
|
|
22
|
+
description: You can edit `pages/index.mdx` to update this page.
|
|
23
|
+
- title: Add new page
|
|
24
|
+
description: You can create a file under `pages` folder that shares the same structure as `pages/index.mdx` to add new page to this site.
|
|
25
|
+
- title: Enable/Disable i18n pages
|
|
26
|
+
description: You can set `enableLocale` to `true/false` in `.blocklet-page/composes/MyLayout.mdx` to enable/disable i18n.
|
|
27
|
+
- title: Enable/Disable DID Connect
|
|
28
|
+
description: You can set `enableConnect` to `true/false` in `.blocklet-page/composes/MyLayout.mdx` to enable/disable DID Connect, which requires this website run as a blocklet.
|
|
29
|
+
---
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: 'my-layout'
|
|
3
|
+
blocks:
|
|
4
|
+
- name: SectionHero
|
|
5
|
+
title: 这是什么?
|
|
6
|
+
description: !md 这是一个由[Blocklet Pages](https://pages.blocklet.io)驱动的网站,这是一个灵活的内容创作系统,支持产品页面和文档页面。
|
|
7
|
+
actions:
|
|
8
|
+
- name: Button
|
|
9
|
+
children: 了解更多
|
|
10
|
+
variant: contained
|
|
11
|
+
href: https://pages.blocklet.io
|
|
12
|
+
- name: SectionAccordionList
|
|
13
|
+
title: 如何更新本网站?
|
|
14
|
+
description: 你可以通过调整文件或更换图片来快速更新这个网站。
|
|
15
|
+
list:
|
|
16
|
+
- title: 更新网站配置
|
|
17
|
+
description: 你可以通过改变这个网站的名称和描述来更新`.blocklet-page/config.yml`。
|
|
18
|
+
- title: 更新网站标识
|
|
19
|
+
description: 你可以替换`.blocklet-page/composes/images/logo.png`来更新这个网站的标志。
|
|
20
|
+
- title: 更新此页面
|
|
21
|
+
description: 你可以编辑`pages/index.zh.mdx`来更新这个页面。
|
|
22
|
+
- title: 如何添加新页面?
|
|
23
|
+
description: 你可以参考 `pages/index.zh.mdx` 在 pages 目录下新建 mdx 文件来添加新页面
|
|
24
|
+
- title: 启用/禁用i18n页面
|
|
25
|
+
description: 你可以在`.blocklet-page/composes/MyLayout.mdx`中设置`enableLocale`为`true/false`来启用/禁用i18n。
|
|
26
|
+
- title: 启用/禁用 DID Connect
|
|
27
|
+
description: 你可以在`.blocklet-page/composes/MyLayout.mdx`中设置`enableConnect`为`true/false`,以启用/禁用 DID Connect,这需要本网站以 blocklet 形式运行。
|
|
28
|
+
---
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Create Blocklet
|
|
2
|
+
title: Create Blocklet
|
|
3
|
+
description: Bootstrap a blocklet within seconds
|
|
4
|
+
theme: docs
|
|
5
|
+
github: https://github.com/blocklet/create-blocklet
|
|
6
|
+
themeConfig:
|
|
7
|
+
colors:
|
|
8
|
+
primary: '#25C99B'
|
|
9
|
+
sidebar:
|
|
10
|
+
en:
|
|
11
|
+
- text: Getting Started
|
|
12
|
+
items:
|
|
13
|
+
- text: Introduction
|
|
14
|
+
link: /intro
|
|
15
|
+
- text: Markdown Reference
|
|
16
|
+
link: /markdown
|
|
17
|
+
zh:
|
|
18
|
+
- text: 快速上手
|
|
19
|
+
items:
|
|
20
|
+
- text: 介绍
|
|
21
|
+
link: /intro
|
|
22
|
+
- text: Markdown 参考
|
|
23
|
+
link: /markdown
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: template-doc-site
|
|
2
|
+
title: Doc Site Template
|
|
3
|
+
description: A Blocklet Server blocklet
|
|
4
|
+
keywords:
|
|
5
|
+
- blocklet
|
|
6
|
+
- doc-site
|
|
7
|
+
- xmark
|
|
8
|
+
group: static
|
|
9
|
+
did: ''
|
|
10
|
+
main: dist
|
|
11
|
+
author:
|
|
12
|
+
name: Arcblock
|
|
13
|
+
email: blocklet@arcblock.io
|
|
14
|
+
repository:
|
|
15
|
+
type: git
|
|
16
|
+
url: 'git+https://github.com/blocklet/create-blocklet.git'
|
|
17
|
+
specVersion: 1.1.1
|
|
18
|
+
version: 0.1.0
|
|
19
|
+
logo: logo.png
|
|
20
|
+
files:
|
|
21
|
+
- logo.png
|
|
22
|
+
- screenshots
|
|
23
|
+
interfaces:
|
|
24
|
+
- type: web
|
|
25
|
+
name: publicUrl
|
|
26
|
+
path: /
|
|
27
|
+
prefix: '*'
|
|
28
|
+
port: BLOCKLET_PORT
|
|
29
|
+
protocol: http
|
|
30
|
+
community: ''
|
|
31
|
+
documentation: ''
|
|
32
|
+
homepage: ''
|
|
33
|
+
license: ''
|
|
34
|
+
payment:
|
|
35
|
+
price: []
|
|
36
|
+
share: []
|
|
37
|
+
timeout:
|
|
38
|
+
start: 60
|
|
39
|
+
requirements:
|
|
40
|
+
abtnode: '>=1.6.22'
|
|
41
|
+
os: '*'
|
|
42
|
+
cpu: '*'
|
|
43
|
+
scripts:
|
|
44
|
+
dev: npm run start
|
|
45
|
+
environments: []
|
|
46
|
+
capabilities: {}
|
|
47
|
+
screenshots: []
|
|
48
|
+
children: []
|
|
49
|
+
navigation:
|
|
50
|
+
- title:
|
|
51
|
+
en: Doc Site
|
|
52
|
+
zh: 文档站点模板
|
|
53
|
+
link:
|
|
54
|
+
en: /en
|
|
55
|
+
zh: /zh
|
|
56
|
+
- title:
|
|
57
|
+
en: ArcBlock
|
|
58
|
+
zh: ArcBlock
|
|
59
|
+
link:
|
|
60
|
+
en: https://www.arcblock.io/en/
|
|
61
|
+
zh: https://www.arcblock.io/zh/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "doc-site",
|
|
3
|
+
"private": true,
|
|
4
|
+
"scripts": {
|
|
5
|
+
"dev": "blocklet dev",
|
|
6
|
+
"start": "xmark start",
|
|
7
|
+
"clean": "rm -rf .blocklet && rm -rf node_modules/.vite",
|
|
8
|
+
"build": "xmark build --base=/",
|
|
9
|
+
"bundle": "npm run clean && xmark build && blocklet bundle --create-release",
|
|
10
|
+
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
11
|
+
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@xmark/cli": "^2.4.36",
|
|
15
|
+
"@xmark/theme-docs": "^2.4.36"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: 'documentation'
|
|
3
|
+
title: Introduction
|
|
4
|
+
priority: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What is this?
|
|
8
|
+
|
|
9
|
+
This is a documentation site powered by [Blocklet Pages](https://pages.blocklet.io), a flexible content authoring system that supports both product pages and documentation pages.
|
|
10
|
+
|
|
11
|
+
## How to make changes?
|
|
12
|
+
|
|
13
|
+
- Edit `.blocklet-page/config.yml` to update the following sections:
|
|
14
|
+
- the `sidebar` navigation
|
|
15
|
+
- the github link for this documentation
|
|
16
|
+
- the `color` palette for this documentation
|
|
17
|
+
- the title and description for this documentation
|
|
18
|
+
- Replace `.blocklet-page/composes/images/logo.png` to update the logo
|
|
19
|
+
- Edit `pages/intro/index.mdx` to update this page, valid markdown syntax are supported.
|
|
20
|
+
- Create a file under `pages` directory that shares the same structure with `pages/intro/index.mdx` to add a new page, you can also put new page into nested directory.
|
|
21
|
+
|
|
22
|
+
## More about Blocklet Pages?
|
|
23
|
+
|
|
24
|
+
You can learn more about Blocklet Pages from its official website: https://pages.blocklet.io/, which includes a lot of samples and examples.
|
|
25
|
+
|
|
26
|
+
## Submit Feedback
|
|
27
|
+
|
|
28
|
+
- Issues related to this template: https://github.com/blocklet/create-blocklet/issues
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: 'documentation'
|
|
3
|
+
title: 关于 Doc Site 模板
|
|
4
|
+
priority: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 这是什么?
|
|
8
|
+
|
|
9
|
+
这是一个由[Blocklet Pages](https://pages.blocklet.io)驱动的文档网站,这是一个灵活的内容创作系统,支持产品页面和文档页面。
|
|
10
|
+
|
|
11
|
+
## 如何进行修改?
|
|
12
|
+
|
|
13
|
+
- 编辑`.blocklet-page/config.yml`以更新以下部分。
|
|
14
|
+
- 侧边栏 "导航
|
|
15
|
+
- 该文档的 github 链接
|
|
16
|
+
- 该文档的 "颜色 "调色板
|
|
17
|
+
- 本文档的标题和描述
|
|
18
|
+
- 替换`.blocklet-page/composes/images/logo.png`以更新标识。
|
|
19
|
+
- 编辑`pages/intro/index.zh.mdx`来更新这个页面,支持有效的 markdown 语法。
|
|
20
|
+
- 在`pages`目录下创建一个与`pages/intro/index.mdx`结构相同的文件来添加一个新的页面,你也可以把新的页面放到嵌套目录中。
|
|
21
|
+
|
|
22
|
+
## 更多关于 Blocklet 页面的信息?
|
|
23
|
+
|
|
24
|
+
你可以从它的官方网站上了解更多关于 Blocklet Pages 的信息:https://pages.blocklet.io/,其中包括大量的样本和例子。
|
|
25
|
+
|
|
26
|
+
## 提交反馈
|
|
27
|
+
|
|
28
|
+
欢迎[提交反馈](https://github.com/blocklet/create-blocklet/issues),我们将尽快处理。
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
extends: '@arcblock/eslint-config-base',
|
|
4
|
+
globals: {
|
|
5
|
+
logger: true,
|
|
6
|
+
},
|
|
7
|
+
rules: {
|
|
8
|
+
'no-console': 'off',
|
|
9
|
+
'no-restricted-syntax': [
|
|
10
|
+
'error',
|
|
11
|
+
{
|
|
12
|
+
selector: "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]",
|
|
13
|
+
message: 'Unexpected property on console object was called',
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
settings: {
|
|
18
|
+
react: {
|
|
19
|
+
version: '999.999.999',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -4,24 +4,41 @@
|
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "api/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"lint": "eslint api --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
8
|
+
"lint:fix": "npm run lint -- --fix",
|
|
7
9
|
"dev": "blocklet dev",
|
|
8
10
|
"start": "NODE_ENV=development nodemon api/index.js -w api",
|
|
9
11
|
"clean": "rm -rf .blocklet",
|
|
10
12
|
"bundle": "npm run clean && blocklet bundle --zip --create-release",
|
|
11
13
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
12
|
-
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json"
|
|
14
|
+
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
15
|
+
"prepare": "husky install"
|
|
16
|
+
},
|
|
17
|
+
"lint-staged": {
|
|
18
|
+
"*.{mjs,js,ts}": [
|
|
19
|
+
"prettier --write",
|
|
20
|
+
"eslint"
|
|
21
|
+
],
|
|
22
|
+
"*.{css,less,scss,json,graphql}": [
|
|
23
|
+
"prettier --write"
|
|
24
|
+
]
|
|
13
25
|
},
|
|
14
26
|
"keywords": [],
|
|
15
27
|
"author": "",
|
|
16
28
|
"license": "ISC",
|
|
17
29
|
"dependencies": {
|
|
18
30
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
19
|
-
"@blocklet/sdk": "^1.8.
|
|
20
|
-
"@ocap/client": "^1.17.
|
|
31
|
+
"@blocklet/sdk": "^1.8.13",
|
|
32
|
+
"@ocap/client": "^1.17.16",
|
|
21
33
|
"dotenv-flow": "^3.2.0",
|
|
22
34
|
"express": "^4.18.1"
|
|
23
35
|
},
|
|
24
36
|
"devDependencies": {
|
|
25
|
-
"nodemon": "^2.0.19"
|
|
37
|
+
"nodemon": "^2.0.19",
|
|
38
|
+
"@arcblock/eslint-config-base": "^0.2.3",
|
|
39
|
+
"eslint": "^8.23.0",
|
|
40
|
+
"husky": "^8.0.1",
|
|
41
|
+
"lint-staged": "^12.5.0",
|
|
42
|
+
"prettier": "^2.7.1"
|
|
26
43
|
}
|
|
27
44
|
}
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@arcblock/did-auth": "^1.17.
|
|
28
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
29
29
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
30
|
-
"@blocklet/sdk": "^1.8.
|
|
31
|
-
"@ocap/client": "^1.17.
|
|
32
|
-
"@ocap/mcrypto": "^1.17.
|
|
33
|
-
"@ocap/wallet": "^1.17.
|
|
30
|
+
"@blocklet/sdk": "^1.8.13",
|
|
31
|
+
"@ocap/client": "^1.17.16",
|
|
32
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
33
|
+
"@ocap/wallet": "^1.17.16",
|
|
34
34
|
"dotenv-flow": "^3.2.0",
|
|
35
35
|
"express": "^4.18.1",
|
|
36
36
|
"next": "12.2.3",
|
|
@@ -28,7 +28,7 @@ if (isProduction) {
|
|
|
28
28
|
app.use(compression());
|
|
29
29
|
|
|
30
30
|
const staticDir = path.resolve(__dirname, '../', 'build');
|
|
31
|
-
app.use(express.static(staticDir, {
|
|
31
|
+
app.use(express.static(staticDir, { maxAge: '30d', index: false }));
|
|
32
32
|
app.use(router);
|
|
33
33
|
app.use(fallback('index.html', { root: staticDir }));
|
|
34
34
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
require('dotenv-flow').config();
|
|
2
2
|
|
|
3
|
+
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
|
|
4
|
+
|
|
3
5
|
const port = process.env.BLOCKLET_PORT || process.env.PORT || 3000;
|
|
4
6
|
const apiPort = process.env.API_PORT || 3030;
|
|
5
|
-
|
|
6
7
|
const whenDev = process.env.NODE_ENV === 'development';
|
|
7
|
-
|
|
8
8
|
const mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
9
9
|
|
|
10
|
+
const plugins = [new NodePolyfillPlugin({ excludeAliases: ['console'] })];
|
|
11
|
+
|
|
10
12
|
const webpackConfig = whenDev
|
|
11
13
|
? {
|
|
12
14
|
configure: {
|
|
@@ -14,8 +16,9 @@ const webpackConfig = whenDev
|
|
|
14
16
|
publicPath: '', // When the dev mode as component, this line required
|
|
15
17
|
},
|
|
16
18
|
},
|
|
19
|
+
plugins,
|
|
17
20
|
}
|
|
18
|
-
: {};
|
|
21
|
+
: { plugins };
|
|
19
22
|
|
|
20
23
|
module.exports = {
|
|
21
24
|
webpack: {
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcblock/did-auth": "^1.17.
|
|
42
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
43
43
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
44
|
-
"@blocklet/sdk": "^1.8.
|
|
45
|
-
"@ocap/client": "^1.17.
|
|
46
|
-
"@ocap/mcrypto": "^1.17.
|
|
47
|
-
"@ocap/wallet": "^1.17.
|
|
44
|
+
"@blocklet/sdk": "^1.8.13",
|
|
45
|
+
"@ocap/client": "^1.17.16",
|
|
46
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
47
|
+
"@ocap/wallet": "^1.17.16",
|
|
48
48
|
"axios": "^0.27.2",
|
|
49
49
|
"compression": "^1.7.4",
|
|
50
50
|
"cookie-parser": "^1.4.6",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"react-router-dom": "^6.3.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@arcblock/eslint-config": "^0.2.
|
|
61
|
+
"@arcblock/eslint-config": "^0.2.3",
|
|
62
62
|
"@craco/craco": "^6.4.5",
|
|
63
|
-
"
|
|
64
|
-
"eslint": "^8.22.0",
|
|
63
|
+
"eslint": "^8.23.0",
|
|
65
64
|
"husky": "^8.0.1",
|
|
66
65
|
"lint-staged": "^12.5.0",
|
|
67
66
|
"nodemon": "^2.0.19",
|
|
67
|
+
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
68
68
|
"npm-run-all": "^4.1.5",
|
|
69
69
|
"prettier": "^2.7.1",
|
|
70
70
|
"react-scripts": "5.0.1"
|
|
@@ -33,7 +33,7 @@ if (isProduction) {
|
|
|
33
33
|
app.use(compression());
|
|
34
34
|
|
|
35
35
|
const staticDir = path.resolve(__dirname, '../', 'build');
|
|
36
|
-
app.use(express.static(staticDir, {
|
|
36
|
+
app.use(express.static(staticDir, { maxAge: '30d', index: false }));
|
|
37
37
|
app.use(router);
|
|
38
38
|
app.use(fallback('index.html', { root: staticDir }));
|
|
39
39
|
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcblock/did-auth": "^1.17.
|
|
42
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
43
43
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
44
|
-
"@blocklet/sdk": "^1.8.
|
|
45
|
-
"@ocap/client": "^1.17.
|
|
46
|
-
"@ocap/mcrypto": "^1.17.
|
|
47
|
-
"@ocap/wallet": "^1.17.
|
|
44
|
+
"@blocklet/sdk": "^1.8.13",
|
|
45
|
+
"@ocap/client": "^1.17.16",
|
|
46
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
47
|
+
"@ocap/wallet": "^1.17.16",
|
|
48
48
|
"axios": "^0.27.2",
|
|
49
49
|
"compression": "^1.7.4",
|
|
50
50
|
"cookie-parser": "^1.4.6",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"react-router-dom": "^6.3.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@arcblock/eslint-config": "^0.2.
|
|
62
|
+
"@arcblock/eslint-config": "^0.2.3",
|
|
63
63
|
"@craco/craco": "^6.4.5",
|
|
64
|
-
"eslint": "^8.
|
|
64
|
+
"eslint": "^8.23.0",
|
|
65
65
|
"husky": "^8.0.1",
|
|
66
66
|
"lint-staged": "^12.5.0",
|
|
67
67
|
"nodemon": "^2.0.19",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"react-router-dom": "^6.3.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@arcblock/eslint-config": "^0.2.
|
|
43
|
+
"@arcblock/eslint-config": "^0.2.3",
|
|
44
44
|
"@craco/craco": "^6.4.5",
|
|
45
|
-
"eslint": "^8.
|
|
45
|
+
"eslint": "^8.23.0",
|
|
46
46
|
"husky": "^8.0.1",
|
|
47
47
|
"lint-staged": "^12.5.0",
|
|
48
48
|
"prettier": "^2.7.1",
|
|
@@ -28,7 +28,7 @@ if (isProduction) {
|
|
|
28
28
|
app.use(compression());
|
|
29
29
|
|
|
30
30
|
const staticDir = path.resolve(__dirname, '../', 'dist');
|
|
31
|
-
app.use(express.static(staticDir, {
|
|
31
|
+
app.use(express.static(staticDir, { maxAge: '30d', index: false }));
|
|
32
32
|
app.use(router);
|
|
33
33
|
app.use(fallback('index.html', { root: staticDir }));
|
|
34
34
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"eslint": "^8.
|
|
23
|
+
"eslint": "^8.23.0",
|
|
24
24
|
"eslint-config-prettier": "^8.5.0",
|
|
25
25
|
"eslint-plugin-prettier": "^4.2.1",
|
|
26
26
|
"eslint-plugin-solid": "0.7.1",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"npm-run-all": "^4.1.5",
|
|
31
31
|
"prettier": "^2.7.1",
|
|
32
32
|
"vite": "^3.0.9",
|
|
33
|
-
"vite-plugin-blocklet": "^0.4.
|
|
33
|
+
"vite-plugin-blocklet": "^0.4.48",
|
|
34
34
|
"vite-plugin-html": "^3.2.0",
|
|
35
35
|
"vite-plugin-solid": "^2.3.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@arcblock/did-auth": "^1.17.
|
|
38
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
39
39
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
40
|
-
"@blocklet/sdk": "^1.8.
|
|
41
|
-
"@ocap/client": "^1.17.
|
|
42
|
-
"@ocap/mcrypto": "^1.17.
|
|
43
|
-
"@ocap/wallet": "^1.17.
|
|
40
|
+
"@blocklet/sdk": "^1.8.13",
|
|
41
|
+
"@ocap/client": "^1.17.16",
|
|
42
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
43
|
+
"@ocap/wallet": "^1.17.16",
|
|
44
44
|
"axios": "^0.27.2",
|
|
45
45
|
"compression": "^1.7.4",
|
|
46
46
|
"cookie-parser": "^1.4.6",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"express": "^4.18.1",
|
|
50
50
|
"express-async-errors": "^3.1.1",
|
|
51
51
|
"express-history-api-fallback": "^2.2.1",
|
|
52
|
-
"solid-js": "^1.
|
|
52
|
+
"solid-js": "^1.5.2"
|
|
53
53
|
},
|
|
54
54
|
"lint-staged": {
|
|
55
55
|
"*.{mjs,js,vue}": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"eslint": "^8.
|
|
19
|
+
"eslint": "^8.23.0",
|
|
20
20
|
"eslint-config-prettier": "^8.5.0",
|
|
21
21
|
"eslint-plugin-prettier": "^4.2.1",
|
|
22
22
|
"eslint-plugin-solid": "0.7.1",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"lint-staged": "^12.5.0",
|
|
25
25
|
"prettier": "^2.7.1",
|
|
26
26
|
"vite": "^3.0.9",
|
|
27
|
-
"vite-plugin-blocklet": "^0.4.
|
|
27
|
+
"vite-plugin-blocklet": "^0.4.48",
|
|
28
28
|
"vite-plugin-html": "^3.2.0",
|
|
29
29
|
"vite-plugin-solid": "^2.3.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"solid-js": "^1.
|
|
32
|
+
"solid-js": "^1.5.2"
|
|
33
33
|
},
|
|
34
34
|
"lint-staged": {
|
|
35
35
|
"*.{mjs,js,vue}": [
|
|
@@ -28,7 +28,7 @@ if (isProduction) {
|
|
|
28
28
|
app.use(compression());
|
|
29
29
|
|
|
30
30
|
const staticDir = path.resolve(__dirname, '../', 'dist');
|
|
31
|
-
app.use(express.static(staticDir, {
|
|
31
|
+
app.use(express.static(staticDir, { maxAge: '30d', index: false }));
|
|
32
32
|
app.use(router);
|
|
33
33
|
app.use(fallback('index.html', { root: staticDir }));
|
|
34
34
|
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"prepare": "husky install"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@arcblock/did-auth": "^1.17.
|
|
20
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
21
21
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
22
|
-
"@blocklet/sdk": "^1.8.
|
|
23
|
-
"@ocap/client": "^1.17.
|
|
24
|
-
"@ocap/mcrypto": "^1.17.
|
|
25
|
-
"@ocap/wallet": "^1.17.
|
|
22
|
+
"@blocklet/sdk": "^1.8.13",
|
|
23
|
+
"@ocap/client": "^1.17.16",
|
|
24
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
25
|
+
"@ocap/wallet": "^1.17.16",
|
|
26
26
|
"axios": "^0.27.2",
|
|
27
27
|
"compression": "^1.7.4",
|
|
28
28
|
"cookie-parser": "^1.4.6",
|
|
@@ -34,16 +34,17 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@sveltejs/vite-plugin-svelte": "1.0.1",
|
|
37
|
-
"eslint": "^8.
|
|
37
|
+
"eslint": "^8.23.0",
|
|
38
38
|
"eslint-config-prettier": "^8.5.0",
|
|
39
39
|
"eslint-plugin-prettier": "^4.2.1",
|
|
40
40
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
41
41
|
"husky": "^8.0.1",
|
|
42
42
|
"lint-staged": "^12.5.0",
|
|
43
|
+
"npm-run-all": "^4.1.5",
|
|
43
44
|
"prettier": "^2.7.1",
|
|
44
45
|
"svelte": "^3.49.0",
|
|
45
46
|
"vite": "^3.0.9",
|
|
46
|
-
"vite-plugin-blocklet": "^0.4.
|
|
47
|
+
"vite-plugin-blocklet": "^0.4.48",
|
|
47
48
|
"vite-plugin-html": "^3.2.0"
|
|
48
49
|
},
|
|
49
50
|
"lint-staged": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@sveltejs/vite-plugin-svelte": "1.0.1",
|
|
19
|
-
"eslint": "^8.
|
|
19
|
+
"eslint": "^8.23.0",
|
|
20
20
|
"eslint-config-prettier": "^8.5.0",
|
|
21
21
|
"eslint-plugin-prettier": "^4.2.1",
|
|
22
22
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prettier": "^2.7.1",
|
|
26
26
|
"svelte": "^3.49.0",
|
|
27
27
|
"vite": "^3.0.9",
|
|
28
|
-
"vite-plugin-blocklet": "^0.4.
|
|
28
|
+
"vite-plugin-blocklet": "^0.4.48",
|
|
29
29
|
"vite-plugin-html": "^3.2.0"
|
|
30
30
|
},
|
|
31
31
|
"lint-staged": {
|
|
@@ -28,7 +28,7 @@ if (isProduction) {
|
|
|
28
28
|
app.use(compression());
|
|
29
29
|
|
|
30
30
|
const staticDir = path.resolve(__dirname, '../', 'dist');
|
|
31
|
-
app.use(express.static(staticDir, {
|
|
31
|
+
app.use(express.static(staticDir, { maxAge: '30d', index: false }));
|
|
32
32
|
app.use(router);
|
|
33
33
|
app.use(fallback('index.html', { root: staticDir }));
|
|
34
34
|
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"prepare": "husky install"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-auth": "^1.17.
|
|
21
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
22
22
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
23
|
-
"@blocklet/sdk": "^1.8.
|
|
24
|
-
"@ocap/client": "^1.17.
|
|
25
|
-
"@ocap/mcrypto": "^1.17.
|
|
26
|
-
"@ocap/wallet": "^1.17.
|
|
23
|
+
"@blocklet/sdk": "^1.8.13",
|
|
24
|
+
"@ocap/client": "^1.17.16",
|
|
25
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
26
|
+
"@ocap/wallet": "^1.17.16",
|
|
27
27
|
"axios": "^0.27.2",
|
|
28
28
|
"compression": "^1.7.4",
|
|
29
29
|
"cookie-parser": "^1.4.6",
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@vitejs/plugin-vue": "^3.0.3",
|
|
40
|
-
"eslint": "^8.
|
|
40
|
+
"eslint": "^8.23.0",
|
|
41
41
|
"eslint-config-prettier": "^8.5.0",
|
|
42
42
|
"eslint-plugin-prettier": "^4.2.1",
|
|
43
|
-
"eslint-plugin-vue": "^9.
|
|
43
|
+
"eslint-plugin-vue": "^9.4.0",
|
|
44
44
|
"husky": "^8.0.1",
|
|
45
45
|
"lint-staged": "^12.5.0",
|
|
46
46
|
"nodemon": "^2.0.19",
|
|
47
47
|
"npm-run-all": "^4.1.5",
|
|
48
48
|
"prettier": "^2.7.1",
|
|
49
49
|
"vite": "^3.0.9",
|
|
50
|
-
"vite-plugin-blocklet": "^0.4.
|
|
50
|
+
"vite-plugin-blocklet": "^0.4.48"
|
|
51
51
|
},
|
|
52
52
|
"lint-staged": {
|
|
53
53
|
"*.{mjs,js,vue}": [
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@vitejs/plugin-vue": "^3.0.3",
|
|
21
|
-
"eslint": "^8.
|
|
21
|
+
"eslint": "^8.23.0",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
23
|
"eslint-plugin-prettier": "^4.2.1",
|
|
24
|
-
"eslint-plugin-vue": "^9.
|
|
24
|
+
"eslint-plugin-vue": "^9.4.0",
|
|
25
25
|
"husky": "^8.0.1",
|
|
26
26
|
"lint-staged": "^12.5.0",
|
|
27
27
|
"prettier": "^2.7.1",
|
|
28
28
|
"vite": "^3.0.9",
|
|
29
|
-
"vite-plugin-blocklet": "^0.4.
|
|
29
|
+
"vite-plugin-blocklet": "^0.4.48",
|
|
30
30
|
"vite-plugin-html": "^3.2.0"
|
|
31
31
|
},
|
|
32
32
|
"lint-staged": {
|
|
@@ -28,7 +28,7 @@ if (isProduction) {
|
|
|
28
28
|
app.use(compression());
|
|
29
29
|
|
|
30
30
|
const staticDir = path.resolve(__dirname, '../', 'dist');
|
|
31
|
-
app.use(express.static(staticDir, {
|
|
31
|
+
app.use(express.static(staticDir, { maxAge: '30d', index: false }));
|
|
32
32
|
app.use(router);
|
|
33
33
|
app.use(fallback('index.html', { root: staticDir }));
|
|
34
34
|
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"prepare": "husky install"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-auth": "^1.17.
|
|
21
|
+
"@arcblock/did-auth": "^1.17.16",
|
|
22
22
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
23
|
-
"@blocklet/sdk": "^1.8.
|
|
24
|
-
"@ocap/client": "^1.17.
|
|
25
|
-
"@ocap/mcrypto": "^1.17.
|
|
26
|
-
"@ocap/wallet": "^1.17.
|
|
23
|
+
"@blocklet/sdk": "^1.8.13",
|
|
24
|
+
"@ocap/client": "^1.17.16",
|
|
25
|
+
"@ocap/mcrypto": "^1.17.16",
|
|
26
|
+
"@ocap/wallet": "^1.17.16",
|
|
27
27
|
"axios": "^0.27.2",
|
|
28
28
|
"compression": "^1.7.4",
|
|
29
29
|
"cookie-parser": "^1.4.6",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"vue": "~2.6.14"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@babel/core": "^7.18.
|
|
38
|
+
"@babel/core": "^7.18.13",
|
|
39
39
|
"@babel/eslint-parser": "^7.18.9",
|
|
40
40
|
"@vue/cli-plugin-babel": "~5.0.8",
|
|
41
41
|
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
42
42
|
"@vue/cli-service": "~5.0.8",
|
|
43
|
-
"core-js": "^3.
|
|
44
|
-
"eslint": "^8.
|
|
43
|
+
"core-js": "^3.25.0",
|
|
44
|
+
"eslint": "^8.23.0",
|
|
45
45
|
"eslint-config-prettier": "^8.5.0",
|
|
46
46
|
"eslint-plugin-prettier": "^4.2.1",
|
|
47
|
-
"eslint-plugin-vue": "^9.
|
|
47
|
+
"eslint-plugin-vue": "^9.4.0",
|
|
48
48
|
"husky": "^8.0.1",
|
|
49
49
|
"lint-staged": "^12.5.0",
|
|
50
50
|
"nodemon": "^2.0.19",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"vue": "~2.6.14"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@babel/core": "^7.18.
|
|
20
|
+
"@babel/core": "^7.18.13",
|
|
21
21
|
"@babel/eslint-parser": "^7.18.9",
|
|
22
22
|
"@vue/cli-plugin-babel": "~5.0.8",
|
|
23
23
|
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
24
24
|
"@vue/cli-service": "~5.0.8",
|
|
25
|
-
"core-js": "^3.
|
|
26
|
-
"eslint": "^8.
|
|
25
|
+
"core-js": "^3.25.0",
|
|
26
|
+
"eslint": "^8.23.0",
|
|
27
27
|
"eslint-config-prettier": "^8.5.0",
|
|
28
28
|
"eslint-plugin-prettier": "^4.2.1",
|
|
29
|
-
"eslint-plugin-vue": "^9.
|
|
29
|
+
"eslint-plugin-vue": "^9.4.0",
|
|
30
30
|
"husky": "^8.0.1",
|
|
31
31
|
"lint-staged": "^12.5.0",
|
|
32
32
|
"vue-template-compiler": "~2.6.14"
|