Skip to content

Commit

Permalink
feat(todo-list-example): improve the todo-list template (#320)
Browse files Browse the repository at this point in the history
feat(todo-list-example): improve the todo-list template
  • Loading branch information
skypesky committed Apr 7, 2024
1 parent c6aeab3 commit 897f22e
Show file tree
Hide file tree
Showing 24 changed files with 80 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.9 (2024-4-7)

- feat(todo-list-example): improve the todo-list template

## 0.7.8 (2024-4-5)

- fix: remove invalid eject command
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "create-blocklet",
"private": true,
"version": "0.7.8",
"version": "0.7.9",
"description": "",
"scripts": {
"debug": "node packages/create-app/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-blocklet",
"version": "0.7.8",
"version": "0.7.9",
"exports": "./index.js",
"type": "module",
"repository": "git@github.com:blocklet/create-blocklet.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-dapp-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-svgr": "^4.2.0",
"zx": "^7.2.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-svgr": "^4.2.0",
"zx": "^7.2.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-gun-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-svgr": "^4.2.0",
"zx": "^7.2.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-svgr": "^4.2.0",
"zx": "^7.2.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/solidjs-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-solid": "^2.8.0",
"zx": "^7.2.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/solidjs-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-solid": "^2.8.0",
"zx": "^7.2.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/svelte-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"rimraf": "^3.0.2",
"svelte": "^4.2.8",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"zx": "^7.2.3"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/svelte-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"rimraf": "^3.0.2",
"svelte": "^4.2.8",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"zx": "^7.2.3"
},
"lint-staged": {
Expand Down
29 changes: 27 additions & 2 deletions packages/create-app/templates/todo-list-example/blocklet.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# template-react
# todo-list-example

A react template for creating a new blocklet project.
## How to start

### Install dependencies

```shell
pnpm install
# or npm install
# or yarn install
```

### Start

```shell
yarn dev
```

## How to connect with DID Spaces

- Step 1: Set the 'capabilities.didSpace' field in blocklet.yml to 'requiredOnConnect', see 'blocklet.yml#capabilities'
- Step 2: To read and write the DID Space, see api/src/routes/todo-list/index.ts#9
- Step 3: Get data from DID Spaces, see 'src/pages/todo-list.tsx#33'
- Step 4: Write data to DID Spaces, see 'src/pages/todo-list.tsx#51'

## Get help

If you want to learn more about the development of DID Spaces, You can also refer to [DID Spaces development documentation] (https://www.arcblock.io/docs/did-spaces/en/did-spaces-how-to-guides). No matter what you encounter a problem, we welcome you in our official BBS (https://community.arcblock.io/) initiated discussions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ payment:
timeout:
start: 60
requirements:
server: '>=1.6.29'
server: '>=1.16.25'
os: '*'
cpu: '*'
scripts:
Expand Down
28 changes: 28 additions & 0 deletions packages/create-app/templates/todo-list-example/blocklet.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# todo-list-example

## 如何启动

### 安装依赖

```shell
pnpm install
# or npm install
# or yarn install
```

### 启动

```shell
yarn dev
```

## 如何与 DID Spaces 对接的

- 步骤 1:将blocklet.yml 中的 `capabilities.didSpace` 字段设置为 `requiredOnConnect`,请参阅 `blocklet.yml#capabilities`
- 步骤 2:实现读写 DID Space 的功能,请参阅 `api/src/routes/todo-list/index.ts#9`
- 步骤 3:从 DID Spaces 获取数据,请参阅 `src/pages/todo-list.tsx#33`
- 步骤 4:将数据写入 DID Spaces,请参阅 `src/pages/todo-list.tsx#51`

## 获得帮助

如果你想了解更多有关 DID Spaces 的开发细节,你还可以参考[DID Spaces 的开发文档](https://www.arcblock.io/docs/did-spaces/en/did-spaces-how-to-guides)。不论你遇到什么问题,我们随时欢迎你在我们的[官方论坛](https://community.arcblock.io/)发起讨论。
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.4.3",
"vite": "^5.0.13",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"vite-plugin-svgr": "^4.2.0",
"zx": "^7.2.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"zx": "^7.2.3"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"zx": "^7.2.3"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue2-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"zx": "^7.2.3"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue2-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"vite": "^5.0.10",
"vite-plugin-blocklet": "^0.7.8",
"vite-plugin-blocklet": "^0.7.9",
"zx": "^7.2.3"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/vite-plugin-blocklet/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-plugin-blocklet",
"type": "module",
"version": "0.7.8",
"version": "0.7.9",
"description": "",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/vite-plugin-wss-hmr/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-plugin-wss-hmr",
"type": "module",
"version": "0.7.8",
"version": "0.7.9",
"description": "",
"main": "index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.8
0.7.9
2 changes: 1 addition & 1 deletion website/docs/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository:
type: git
url: git+https://github.com/blocklet/create-blocklet.git
specVersion: 1.2.8
version: 0.7.8
version: 0.7.9
logo: logo.png
files:
- logo.png
Expand Down
2 changes: 1 addition & 1 deletion website/pages/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository:
type: git
url: git+https://github.com/blocklet/create-blocklet.git
specVersion: 1.2.8
version: 0.7.8
version: 0.7.9
logo: logo.png
files:
- logo.png
Expand Down

0 comments on commit 897f22e

Please sign in to comment.