create-blocklet 0.5.16 → 0.5.17
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/package.json +6 -6
- package/templates/express-api/README.md +11 -11
- package/templates/express-api/package.json +4 -4
- package/templates/html-static/README.md +11 -11
- package/templates/html-static/app/index.html +2 -2
- package/templates/monorepo/README.md +7 -7
- package/templates/monorepo/package.json +2 -2
- package/templates/nextjs-dapp/README.md +11 -11
- package/templates/nextjs-dapp/package.json +5 -5
- package/templates/react-dapp/README.md +11 -11
- package/templates/react-dapp/package.json +10 -9
- package/templates/react-dapp/src/pages/home.jsx +1 -1
- package/templates/react-dapp/vite.config.js +2 -1
- package/templates/react-dapp-ts/README.md +3 -3
- package/templates/react-dapp-ts/package.json +16 -15
- package/templates/react-dapp-ts/src/pages/home.tsx +1 -1
- package/templates/react-dapp-ts/vite.config.ts +2 -1
- package/templates/react-gun-dapp/README.md +11 -11
- package/templates/react-gun-dapp/package.json +10 -9
- package/templates/react-gun-dapp/src/pages/about.jsx +1 -1
- package/templates/react-gun-dapp/src/pages/home.jsx +1 -1
- package/templates/react-gun-dapp/vite.config.js +2 -1
- package/templates/react-static/README.md +11 -11
- package/templates/react-static/package.json +5 -4
- package/templates/react-static/src/pages/home.jsx +1 -1
- package/templates/react-static/vite.config.js +2 -1
- package/templates/solidjs-dapp/README.md +11 -11
- package/templates/solidjs-dapp/package.json +10 -9
- package/templates/solidjs-dapp/src/App.jsx +1 -1
- package/templates/solidjs-dapp/vite.config.js +2 -1
- package/templates/solidjs-static/README.md +11 -11
- package/templates/solidjs-static/package.json +5 -4
- package/templates/solidjs-static/src/App.jsx +1 -1
- package/templates/solidjs-static/vite.config.js +2 -1
- package/templates/svelte-dapp/README.md +11 -11
- package/templates/svelte-dapp/package.json +9 -8
- package/templates/svelte-dapp/vite.config.js +2 -1
- package/templates/svelte-static/README.md +11 -11
- package/templates/svelte-static/package.json +4 -3
- package/templates/svelte-static/vite.config.js +2 -1
- package/templates/vue-dapp/README.md +11 -11
- package/templates/vue-dapp/package.json +10 -9
- package/templates/vue-dapp/vite.config.js +5 -1
- package/templates/vue-static/README.md +11 -11
- package/templates/vue-static/package.json +5 -4
- package/templates/vue-static/vite.config.js +5 -1
- package/templates/vue2-dapp/README.md +11 -11
- package/templates/vue2-dapp/package.json +9 -8
- package/templates/vue2-dapp/vite.config.js +5 -1
- package/templates/vue2-static/README.md +11 -11
- package/templates/vue2-static/package.json +4 -3
- package/templates/vue2-static/vite.config.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-blocklet",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.17",
|
|
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.18.
|
|
33
|
-
"@ocap/mcrypto": "^1.18.
|
|
34
|
-
"@ocap/util": "^1.18.
|
|
32
|
+
"@arcblock/did": "^1.18.50",
|
|
33
|
+
"@ocap/mcrypto": "^1.18.50",
|
|
34
|
+
"@ocap/util": "^1.18.50",
|
|
35
35
|
"boxen": "^6.2.1",
|
|
36
36
|
"ejs": "^3.1.8",
|
|
37
37
|
"envfile": "^6.18.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@arcblock/eslint-config-base": "0.2.2",
|
|
49
|
-
"eslint": "^8.
|
|
50
|
-
"prettier": "^2.8.
|
|
49
|
+
"eslint": "^8.34.0",
|
|
50
|
+
"prettier": "^2.8.4",
|
|
51
51
|
"vitest": "^0.19.1"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -29,16 +29,16 @@ This blocklet is a dapp project, which means this is a full-stack application. I
|
|
|
29
29
|
|
|
30
30
|
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
31
31
|
|
|
32
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
33
|
-
`npm install -g @blocklet/cli`
|
|
34
|
-
See details in [https://
|
|
32
|
+
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
33
|
+
`npm install -g @blocklet/cli`
|
|
34
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
35
35
|
|
|
36
36
|
2. Init blocklet server & start blocklet server
|
|
37
37
|
|
|
38
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
39
|
-
`blocklet server init --mode=debug`
|
|
40
|
-
`blocklet server start`
|
|
41
|
-
See details in [https://
|
|
38
|
+
Before starting an blocklet server, you need to init blocklet server.
|
|
39
|
+
`blocklet server init --mode=debug`
|
|
40
|
+
`blocklet server start`
|
|
41
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
42
42
|
|
|
43
43
|
3. Go to the project directory `cd [name]`
|
|
44
44
|
4. Install dependencies: `npm install` or `yarn`
|
|
@@ -84,7 +84,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
84
84
|
|
|
85
85
|
Get a `accessToken` by using this command.
|
|
86
86
|
|
|
87
|
-
> Why we need a `accessToken`?
|
|
87
|
+
> Why we need a `accessToken`?
|
|
88
88
|
> A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
|
|
89
89
|
|
|
90
90
|
Set `accessToken` to blocklet config
|
|
@@ -103,14 +103,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
103
103
|
|
|
104
104
|
Or you can simply use `npm run upload` command.
|
|
105
105
|
|
|
106
|
-
- You also can upload a new version to a store by Github CI.
|
|
106
|
+
- You also can upload a new version to a store by Github CI.
|
|
107
107
|
Bump version at first.
|
|
108
108
|
|
|
109
109
|
```shell
|
|
110
110
|
make bump-version
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
113
|
+
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
114
114
|
The CI workflow will automatically upload a new version to a store.
|
|
115
115
|
|
|
116
116
|
## Q & A
|
|
@@ -138,7 +138,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
138
138
|
## Learn More
|
|
139
139
|
|
|
140
140
|
- 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)
|
|
141
|
-
- Full document of Blocklet Server & blocklet development: [https://
|
|
141
|
+
- Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
|
|
142
142
|
|
|
143
143
|
## License
|
|
144
144
|
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
34
|
-
"@blocklet/sdk": "^1.8.
|
|
35
|
-
"@ocap/client": "^1.18.
|
|
34
|
+
"@blocklet/sdk": "^1.8.65",
|
|
35
|
+
"@ocap/client": "^1.18.50",
|
|
36
36
|
"dotenv-flow": "^3.2.0",
|
|
37
37
|
"express": "^4.18.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@arcblock/eslint-config-base": "^0.2.3",
|
|
41
41
|
"bumpp": "^8.2.1",
|
|
42
|
-
"eslint": "^8.
|
|
42
|
+
"eslint": "^8.34.0",
|
|
43
43
|
"husky": "^8.0.3",
|
|
44
44
|
"lint-staged": "^12.5.0",
|
|
45
45
|
"nodemon": "^2.0.20",
|
|
46
|
-
"prettier": "^2.8.
|
|
46
|
+
"prettier": "^2.8.4",
|
|
47
47
|
"rimraf": "^3.0.2",
|
|
48
48
|
"zx": "^7.1.1"
|
|
49
49
|
}
|
|
@@ -25,16 +25,16 @@ This blocklet is a static project, which means this is a frontend application. I
|
|
|
25
25
|
|
|
26
26
|
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
27
27
|
|
|
28
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
29
|
-
`npm install -g @blocklet/cli`
|
|
30
|
-
See details in [https://
|
|
28
|
+
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
29
|
+
`npm install -g @blocklet/cli`
|
|
30
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
31
31
|
|
|
32
32
|
2. Init blocklet server & start blocklet server
|
|
33
33
|
|
|
34
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
35
|
-
`blocklet server init --mode=debug`
|
|
36
|
-
`blocklet server start`
|
|
37
|
-
See details in [https://
|
|
34
|
+
Before starting an blocklet server, you need to init blocklet server.
|
|
35
|
+
`blocklet server init --mode=debug`
|
|
36
|
+
`blocklet server start`
|
|
37
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
38
38
|
|
|
39
39
|
3. Go to the project directory `cd [name]`
|
|
40
40
|
4. Install dependencies: `npm install` or `yarn`
|
|
@@ -80,7 +80,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
80
80
|
|
|
81
81
|
Get a `accessToken` from blocklet store.
|
|
82
82
|
|
|
83
|
-
> Why we need a `accessToken`?
|
|
83
|
+
> Why we need a `accessToken`?
|
|
84
84
|
> A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
|
|
85
85
|
|
|
86
86
|
Set `accessToken` to blocklet config
|
|
@@ -99,14 +99,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
99
99
|
|
|
100
100
|
Or you can simply use `npm run upload` command.
|
|
101
101
|
|
|
102
|
-
- You also can upload a new version to blocklet store by Github CI.
|
|
102
|
+
- You also can upload a new version to blocklet store by Github CI.
|
|
103
103
|
Bump version at first.
|
|
104
104
|
|
|
105
105
|
```shell
|
|
106
106
|
make bump-version
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
109
|
+
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
110
110
|
The CI workflow will automatically upload a new version to a store.
|
|
111
111
|
|
|
112
112
|
## Q & A
|
|
@@ -134,7 +134,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
134
134
|
## Learn More
|
|
135
135
|
|
|
136
136
|
- 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)
|
|
137
|
-
- Full document of Blocklet Server & blocklet development: [https://
|
|
137
|
+
- Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
|
|
138
138
|
|
|
139
139
|
## License
|
|
140
140
|
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
<p>Get started by edit <code class="code">app/index.html</code> file</p>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="card-list">
|
|
19
|
-
<a class="card" href="https://
|
|
19
|
+
<a class="card" href="https://developer.blocklet.io/docs/en/blocklet" target="_blank">
|
|
20
20
|
<h3>Documentation →</h3>
|
|
21
21
|
<p>Find in-depth information about blocklet features and API.</p>
|
|
22
22
|
</a>
|
|
23
|
-
<a class="card" href="https://
|
|
23
|
+
<a class="card" href="https://developer.blocklet.io/docs/en" target="_blank">
|
|
24
24
|
<h3>Blocklet Server →</h3>
|
|
25
25
|
<p>Learn about Blocklet Server</p>
|
|
26
26
|
</a>
|
|
@@ -25,16 +25,16 @@ This project is a monorepo project, which means that there are multiple blocklet
|
|
|
25
25
|
|
|
26
26
|
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
27
27
|
|
|
28
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
29
|
-
`npm install -g @blocklet/cli`
|
|
30
|
-
See details in [https://
|
|
28
|
+
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
29
|
+
`npm install -g @blocklet/cli`
|
|
30
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
31
31
|
|
|
32
32
|
2. Init blocklet server & start blocklet server
|
|
33
33
|
|
|
34
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
35
|
-
`blocklet server init --mode=debug`
|
|
36
|
-
`blocklet server start`
|
|
37
|
-
See details in [https://
|
|
34
|
+
Before starting an blocklet server, you need to init blocklet server.
|
|
35
|
+
`blocklet server init --mode=debug`
|
|
36
|
+
`blocklet server start`
|
|
37
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
38
38
|
|
|
39
39
|
3. init project
|
|
40
40
|
|
|
@@ -36,16 +36,16 @@ This blocklet is a dapp project, which means this is a full-stack application. I
|
|
|
36
36
|
|
|
37
37
|
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
38
38
|
|
|
39
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
40
|
-
`npm install -g @blocklet/cli`
|
|
41
|
-
See details in [https://
|
|
39
|
+
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
40
|
+
`npm install -g @blocklet/cli`
|
|
41
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
42
42
|
|
|
43
43
|
2. Init blocklet server & start blocklet server
|
|
44
44
|
|
|
45
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
46
|
-
`blocklet server init --mode=debug`
|
|
47
|
-
`blocklet server start`
|
|
48
|
-
See details in [https://
|
|
45
|
+
Before starting an blocklet server, you need to init blocklet server.
|
|
46
|
+
`blocklet server init --mode=debug`
|
|
47
|
+
`blocklet server start`
|
|
48
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
49
49
|
|
|
50
50
|
3. Go to the project directory `cd [name]`
|
|
51
51
|
4. Install dependencies: `npm install` or `yarn`
|
|
@@ -91,7 +91,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
91
91
|
|
|
92
92
|
Get a `accessToken` by using this command.
|
|
93
93
|
|
|
94
|
-
> Why we need a `accessToken`?
|
|
94
|
+
> Why we need a `accessToken`?
|
|
95
95
|
> A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
|
|
96
96
|
|
|
97
97
|
Set `accessToken` to blocklet config
|
|
@@ -110,14 +110,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
110
110
|
|
|
111
111
|
Or you can simply use `npm run upload` command.
|
|
112
112
|
|
|
113
|
-
- You also can upload a new version to a store by Github CI.
|
|
113
|
+
- You also can upload a new version to a store by Github CI.
|
|
114
114
|
Bump version at first.
|
|
115
115
|
|
|
116
116
|
```shell
|
|
117
117
|
make bump-version
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
120
|
+
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
121
121
|
The CI workflow will automatically upload a new version to a store.
|
|
122
122
|
|
|
123
123
|
## Q & A
|
|
@@ -145,7 +145,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
145
145
|
## Learn More
|
|
146
146
|
|
|
147
147
|
- 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)
|
|
148
|
-
- Full document of Blocklet Server & blocklet development: [https://
|
|
148
|
+
- Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
|
|
149
149
|
|
|
150
150
|
## License
|
|
151
151
|
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@arcblock/did-auth": "^1.18.
|
|
31
|
+
"@arcblock/did-auth": "^1.18.50",
|
|
32
32
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
33
|
-
"@blocklet/sdk": "^1.8.
|
|
34
|
-
"@ocap/client": "^1.18.
|
|
35
|
-
"@ocap/mcrypto": "^1.18.
|
|
36
|
-
"@ocap/wallet": "^1.18.
|
|
33
|
+
"@blocklet/sdk": "^1.8.65",
|
|
34
|
+
"@ocap/client": "^1.18.50",
|
|
35
|
+
"@ocap/mcrypto": "^1.18.50",
|
|
36
|
+
"@ocap/wallet": "^1.18.50",
|
|
37
37
|
"dotenv-flow": "^3.2.0",
|
|
38
38
|
"express": "^4.18.2",
|
|
39
39
|
"next": "12.2.3",
|
|
@@ -36,16 +36,16 @@ This blocklet is a dapp project, which means this is a full-stack application. I
|
|
|
36
36
|
|
|
37
37
|
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
38
38
|
|
|
39
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
40
|
-
`npm install -g @blocklet/cli`
|
|
41
|
-
See details in [https://
|
|
39
|
+
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
40
|
+
`npm install -g @blocklet/cli`
|
|
41
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
42
42
|
|
|
43
43
|
2. Init blocklet server & start blocklet server
|
|
44
44
|
|
|
45
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
46
|
-
`blocklet server init --mode=debug`
|
|
47
|
-
`blocklet server start`
|
|
48
|
-
See details in [https://
|
|
45
|
+
Before starting an blocklet server, you need to init blocklet server.
|
|
46
|
+
`blocklet server init --mode=debug`
|
|
47
|
+
`blocklet server start`
|
|
48
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
49
49
|
|
|
50
50
|
3. Go to the project directory `cd [name]`
|
|
51
51
|
4. Install dependencies: `npm install` or `yarn`
|
|
@@ -91,7 +91,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
91
91
|
|
|
92
92
|
Get a `accessToken` by using this command.
|
|
93
93
|
|
|
94
|
-
> Why we need a `accessToken`?
|
|
94
|
+
> Why we need a `accessToken`?
|
|
95
95
|
> A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
|
|
96
96
|
|
|
97
97
|
Set `accessToken` to blocklet config
|
|
@@ -110,14 +110,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
110
110
|
|
|
111
111
|
Or you can simply use `npm run upload` command.
|
|
112
112
|
|
|
113
|
-
- You also can upload a new version to a store by Github CI.
|
|
113
|
+
- You also can upload a new version to a store by Github CI.
|
|
114
114
|
Bump version at first.
|
|
115
115
|
|
|
116
116
|
```shell
|
|
117
117
|
npm run bump-version
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
120
|
+
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
121
121
|
The CI workflow will automatically upload a new version to a store.
|
|
122
122
|
|
|
123
123
|
## Q & A
|
|
@@ -145,7 +145,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
145
145
|
## Learn More
|
|
146
146
|
|
|
147
147
|
- 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)
|
|
148
|
-
- Full document of Blocklet Server & blocklet development: [https://
|
|
148
|
+
- Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
|
|
149
149
|
|
|
150
150
|
## License
|
|
151
151
|
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@arcblock/did-auth": "^1.18.
|
|
43
|
+
"@arcblock/did-auth": "^1.18.50",
|
|
44
44
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
45
|
-
"@blocklet/sdk": "^1.8.
|
|
46
|
-
"@ocap/client": "^1.18.
|
|
47
|
-
"@ocap/mcrypto": "^1.18.
|
|
48
|
-
"@ocap/wallet": "^1.18.
|
|
45
|
+
"@blocklet/sdk": "^1.8.65",
|
|
46
|
+
"@ocap/client": "^1.18.50",
|
|
47
|
+
"@ocap/mcrypto": "^1.18.50",
|
|
48
|
+
"@ocap/wallet": "^1.18.50",
|
|
49
49
|
"axios": "^0.27.2",
|
|
50
50
|
"compression": "^1.7.4",
|
|
51
51
|
"cookie-parser": "^1.4.6",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"express-history-api-fallback": "^2.2.1",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
|
-
"react-router-dom": "^6.8.
|
|
59
|
+
"react-router-dom": "^6.8.1",
|
|
60
60
|
"rimraf": "^3.0.2"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
@@ -64,14 +64,15 @@
|
|
|
64
64
|
"@vitejs/plugin-react": "^2.2.0",
|
|
65
65
|
"bumpp": "^8.2.1",
|
|
66
66
|
"cross-env": "^7.0.3",
|
|
67
|
-
"eslint": "^8.
|
|
67
|
+
"eslint": "^8.34.0",
|
|
68
68
|
"husky": "^8.0.3",
|
|
69
69
|
"lint-staged": "^12.5.0",
|
|
70
70
|
"nodemon": "^2.0.20",
|
|
71
71
|
"npm-run-all": "^4.1.5",
|
|
72
|
-
"prettier": "^2.8.
|
|
72
|
+
"prettier": "^2.8.4",
|
|
73
73
|
"vite": "^3.2.5",
|
|
74
|
-
"vite-plugin-blocklet": "^0.5.
|
|
74
|
+
"vite-plugin-blocklet": "^0.5.17",
|
|
75
|
+
"vite-plugin-node-polyfills": "^0.7.0",
|
|
75
76
|
"vite-plugin-svgr": "^2.4.0",
|
|
76
77
|
"zx": "^7.1.1"
|
|
77
78
|
}
|
|
@@ -12,7 +12,7 @@ function Home() {
|
|
|
12
12
|
<Link className="app-link" to="/about">
|
|
13
13
|
About
|
|
14
14
|
</Link>
|
|
15
|
-
<a className="app-link" href="https://
|
|
15
|
+
<a className="app-link" href="https://developer.blocklet.io/docs/" target="_blank" rel="noopener noreferrer">
|
|
16
16
|
Learn Blocklet
|
|
17
17
|
</a>
|
|
18
18
|
</header>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
4
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|
4
5
|
import svgr from 'vite-plugin-svgr';
|
|
5
6
|
|
|
6
7
|
// https://vitejs.dev/config/
|
|
7
8
|
export default defineConfig(() => {
|
|
8
9
|
return {
|
|
9
|
-
plugins: [react(), createBlockletPlugin(), svgr()],
|
|
10
|
+
plugins: [react(), createBlockletPlugin(), nodePolyfills({ protocolImports: true }), svgr()],
|
|
10
11
|
};
|
|
11
12
|
});
|
|
@@ -42,14 +42,14 @@ This blocklet is a dapp project, which means this is a full-stack application. I
|
|
|
42
42
|
|
|
43
43
|
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
44
44
|
`npm install -g @blocklet/cli`
|
|
45
|
-
See details in [https://
|
|
45
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
46
46
|
|
|
47
47
|
2. Init blocklet server & start blocklet server
|
|
48
48
|
|
|
49
49
|
Before starting an blocklet server, you need to init blocklet server.
|
|
50
50
|
`blocklet server init --mode=debug`
|
|
51
51
|
`blocklet server start`
|
|
52
|
-
See details in [https://
|
|
52
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
53
53
|
|
|
54
54
|
3. Go to the project directory `cd [name]`
|
|
55
55
|
4. Install dependencies: `npm install` or `yarn`
|
|
@@ -149,7 +149,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
149
149
|
## Learn More
|
|
150
150
|
|
|
151
151
|
- 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)
|
|
152
|
-
- Full document of Blocklet Server & blocklet development: [https://
|
|
152
|
+
- Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
|
|
153
153
|
|
|
154
154
|
## License
|
|
155
155
|
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcblock/did-auth": "^1.18.
|
|
41
|
+
"@arcblock/did-auth": "^1.18.50",
|
|
42
42
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
43
|
-
"@blocklet/sdk": "^1.8.
|
|
44
|
-
"@ocap/client": "^1.18.
|
|
45
|
-
"@ocap/mcrypto": "^1.18.
|
|
46
|
-
"@ocap/wallet": "^1.18.
|
|
43
|
+
"@blocklet/sdk": "^1.8.65",
|
|
44
|
+
"@ocap/client": "^1.18.50",
|
|
45
|
+
"@ocap/mcrypto": "^1.18.50",
|
|
46
|
+
"@ocap/wallet": "^1.18.50",
|
|
47
47
|
"axios": "^0.27.2",
|
|
48
48
|
"compression": "^1.7.4",
|
|
49
49
|
"cookie-parser": "^1.4.6",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"express-history-api-fallback": "^2.2.1",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0",
|
|
57
|
-
"react-router-dom": "^6.8.
|
|
57
|
+
"react-router-dom": "^6.8.1",
|
|
58
58
|
"rimraf": "^3.0.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -64,25 +64,26 @@
|
|
|
64
64
|
"@types/cookie-parser": "^1.4.3",
|
|
65
65
|
"@types/cors": "^2.8.13",
|
|
66
66
|
"@types/dotenv-flow": "^3.2.0",
|
|
67
|
-
"@types/express": "^4.17.
|
|
68
|
-
"@types/node": "^18.
|
|
69
|
-
"@types/react": "^18.0.
|
|
70
|
-
"@types/react-dom": "^18.0.
|
|
67
|
+
"@types/express": "^4.17.17",
|
|
68
|
+
"@types/node": "^18.14.1",
|
|
69
|
+
"@types/react": "^18.0.28",
|
|
70
|
+
"@types/react-dom": "^18.0.11",
|
|
71
71
|
"@vitejs/plugin-react": "^2.2.0",
|
|
72
72
|
"bumpp": "^8.2.1",
|
|
73
73
|
"cross-env": "^7.0.3",
|
|
74
|
-
"eslint": "^8.
|
|
75
|
-
"husky": "^8.0.
|
|
74
|
+
"eslint": "^8.34.0",
|
|
75
|
+
"husky": "^8.0.3",
|
|
76
76
|
"import-sort-style-module": "^6.0.0",
|
|
77
77
|
"lint-staged": "^12.5.0",
|
|
78
78
|
"nodemon": "^2.0.20",
|
|
79
79
|
"npm-run-all": "^4.1.5",
|
|
80
|
-
"prettier": "^2.8.
|
|
80
|
+
"prettier": "^2.8.4",
|
|
81
81
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
82
82
|
"ts-node": "^10.9.1",
|
|
83
|
-
"typescript": "^4.9.
|
|
83
|
+
"typescript": "^4.9.5",
|
|
84
84
|
"vite": "^3.2.5",
|
|
85
|
-
"vite-plugin-blocklet": "^0.5.
|
|
85
|
+
"vite-plugin-blocklet": "^0.5.17",
|
|
86
|
+
"vite-plugin-node-polyfills": "^0.7.0",
|
|
86
87
|
"vite-plugin-svgr": "^2.4.0",
|
|
87
88
|
"zx": "^7.1.1"
|
|
88
89
|
},
|
|
@@ -12,7 +12,7 @@ function Home() {
|
|
|
12
12
|
<Link className="app-link" to="/about">
|
|
13
13
|
About
|
|
14
14
|
</Link>
|
|
15
|
-
<a className="app-link" href="https://
|
|
15
|
+
<a className="app-link" href="https://developer.blocklet.io/docs/" target="_blank" rel="noopener noreferrer">
|
|
16
16
|
Learn Blocklet
|
|
17
17
|
</a>
|
|
18
18
|
</header>
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
import { defineConfig } from 'vite';
|
|
4
4
|
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|
5
6
|
import svgr from 'vite-plugin-svgr';
|
|
6
7
|
|
|
7
8
|
// https://vitejs.dev/config/
|
|
8
9
|
export default defineConfig(() => {
|
|
9
10
|
return {
|
|
10
|
-
plugins: [react(), createBlockletPlugin(), svgr()],
|
|
11
|
+
plugins: [react(), createBlockletPlugin(), nodePolyfills({ protocolImports: true }), svgr()],
|
|
11
12
|
build: {
|
|
12
13
|
// 禁止 preload 可以解决 js 的请求没有 refferer 的问题
|
|
13
14
|
modulePreload: false,
|
|
@@ -36,16 +36,16 @@ This blocklet is a dapp project, which means this is a full-stack application. I
|
|
|
36
36
|
|
|
37
37
|
1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
|
|
38
38
|
|
|
39
|
-
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
40
|
-
`npm install -g @blocklet/cli`
|
|
41
|
-
See details in [https://
|
|
39
|
+
Blocklet needs blocklet server as a dependency. So you need to install it first.
|
|
40
|
+
`npm install -g @blocklet/cli`
|
|
41
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
|
|
42
42
|
|
|
43
43
|
2. Init blocklet server & start blocklet server
|
|
44
44
|
|
|
45
|
-
Before starting an blocklet server, you need to init blocklet server.
|
|
46
|
-
`blocklet server init --mode=debug`
|
|
47
|
-
`blocklet server start`
|
|
48
|
-
See details in [https://
|
|
45
|
+
Before starting an blocklet server, you need to init blocklet server.
|
|
46
|
+
`blocklet server init --mode=debug`
|
|
47
|
+
`blocklet server start`
|
|
48
|
+
See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
|
|
49
49
|
|
|
50
50
|
3. Go to the project directory `cd [name]`
|
|
51
51
|
4. Install dependencies: `npm install` or `yarn`
|
|
@@ -91,7 +91,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
91
91
|
|
|
92
92
|
Get a `accessToken` by using this command.
|
|
93
93
|
|
|
94
|
-
> Why we need a `accessToken`?
|
|
94
|
+
> Why we need a `accessToken`?
|
|
95
95
|
> A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
|
|
96
96
|
|
|
97
97
|
Set `accessToken` to blocklet config
|
|
@@ -110,14 +110,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
110
110
|
|
|
111
111
|
Or you can simply use `npm run upload` command.
|
|
112
112
|
|
|
113
|
-
- You also can upload a new version to a store by Github CI.
|
|
113
|
+
- You also can upload a new version to a store by Github CI.
|
|
114
114
|
Bump version at first.
|
|
115
115
|
|
|
116
116
|
```shell
|
|
117
117
|
make bump-version
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
120
|
+
Push your code to Github main/master branch, or make a pull request to the main/master branch.
|
|
121
121
|
The CI workflow will automatically upload a new version to a store.
|
|
122
122
|
|
|
123
123
|
## Q & A
|
|
@@ -145,7 +145,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
|
|
|
145
145
|
## Learn More
|
|
146
146
|
|
|
147
147
|
- 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)
|
|
148
|
-
- Full document of Blocklet Server & blocklet development: [https://
|
|
148
|
+
- Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
|
|
149
149
|
|
|
150
150
|
## License
|
|
151
151
|
|