create-blocklet 0.7.9 → 0.8.1

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.
Files changed (255) hide show
  1. package/common/.github/workflows/main.yml +10 -7
  2. package/common/.prettierrc +1 -1
  3. package/common/LICENSE +1 -1
  4. package/common/_gitignore +1 -0
  5. package/common/_npmrc +0 -2
  6. package/common/scripts/build-clean.mjs +7 -0
  7. package/index.js +40 -32
  8. package/lib/arcblock.js +1 -1
  9. package/lib/constant.js +1 -0
  10. package/lib/did.js +2 -1
  11. package/lib/git.js +21 -21
  12. package/lib/server.js +10 -10
  13. package/lib/utils.js +2 -1
  14. package/package.json +16 -16
  15. package/templates/express-api/README.md +3 -3
  16. package/templates/express-api/api/hooks/pre-start.js +2 -1
  17. package/templates/express-api/api/index.js +1 -12
  18. package/templates/express-api/blocklet.yml +1 -1
  19. package/templates/express-api/package.json +20 -17
  20. package/templates/express-api/template-info.json +6 -3
  21. package/templates/html-static/README.md +3 -3
  22. package/templates/html-static/app/index.html +35 -36
  23. package/templates/html-static/app/styles/style.css +9 -1
  24. package/templates/html-static/blocklet.yml +1 -1
  25. package/templates/html-static/package.json +6 -5
  26. package/templates/html-static/template-info.json +2 -2
  27. package/templates/monorepo/.prettierrc +1 -1
  28. package/templates/monorepo/README.md +2 -2
  29. package/templates/monorepo/package.json +21 -13
  30. package/templates/monorepo/scripts/bump-version.mjs +1 -1
  31. package/templates/nestjs-api/.eslintrc.js +27 -3
  32. package/templates/nestjs-api/README.md +3 -3
  33. package/templates/nestjs-api/api/app.controller.ts +3 -1
  34. package/templates/nestjs-api/api/app.service.ts +1 -16
  35. package/templates/nestjs-api/api/hooks/pre-start.js +2 -1
  36. package/templates/nestjs-api/blocklet.yml +1 -1
  37. package/templates/nestjs-api/package.json +29 -26
  38. package/templates/nestjs-api/template-info.json +4 -1
  39. package/templates/nestjs-api/tsconfig.build.json +6 -1
  40. package/templates/nestjs-api/tsconfig.eslint.json +7 -0
  41. package/templates/nextjs-dapp/README.md +3 -3
  42. package/templates/nextjs-dapp/api/hooks/pre-start.js +2 -1
  43. package/templates/nextjs-dapp/blocklet.yml +1 -1
  44. package/templates/nextjs-dapp/package.json +23 -20
  45. package/templates/nextjs-dapp/pages/_app.js +1 -1
  46. package/templates/nextjs-dapp/pages/api/hello.js +1 -1
  47. package/templates/nextjs-dapp/pages/index.js +9 -17
  48. package/templates/nextjs-dapp/styles/Home.module.css +12 -3
  49. package/templates/nextjs-dapp/styles/globals.css +12 -2
  50. package/templates/nextjs-dapp/template-info.json +2 -2
  51. package/templates/react-dapp/README.md +3 -3
  52. package/templates/react-dapp/api/hooks/pre-start.js +2 -1
  53. package/templates/react-dapp/api/index.js +1 -0
  54. package/templates/react-dapp/api/routes/index.js +6 -0
  55. package/templates/react-dapp/blocklet.yml +1 -1
  56. package/templates/react-dapp/index.html +14 -11
  57. package/templates/react-dapp/package.json +32 -28
  58. package/templates/react-dapp/src/app.jsx +1 -5
  59. package/templates/react-dapp/src/assets/blocklet.svg +16 -0
  60. package/templates/react-dapp/src/assets/react.svg +1 -0
  61. package/templates/react-dapp/src/assets/vite.svg +1 -0
  62. package/templates/react-dapp/src/index.css +68 -0
  63. package/templates/react-dapp/src/index.jsx +1 -0
  64. package/templates/react-dapp/src/libs/api.js +5 -12
  65. package/templates/react-dapp/src/pages/home.css +45 -0
  66. package/templates/react-dapp/src/pages/home.jsx +42 -15
  67. package/templates/react-dapp/template-info.json +2 -2
  68. package/templates/react-dapp-ts/.eslintrc.js +3 -0
  69. package/templates/react-dapp-ts/README.md +3 -3
  70. package/templates/react-dapp-ts/api/src/hooks/pre-start.ts +2 -2
  71. package/templates/react-dapp-ts/api/src/routes/index.ts +6 -0
  72. package/templates/react-dapp-ts/blocklet.yml +1 -1
  73. package/templates/react-dapp-ts/index.html +14 -11
  74. package/templates/react-dapp-ts/package.json +38 -34
  75. package/templates/react-dapp-ts/src/app.tsx +1 -6
  76. package/templates/react-dapp-ts/src/assets/blocklet.svg +16 -0
  77. package/templates/react-dapp-ts/src/assets/react.svg +1 -0
  78. package/templates/react-dapp-ts/src/assets/vite.svg +1 -0
  79. package/templates/react-dapp-ts/src/index.css +68 -0
  80. package/templates/react-dapp-ts/src/index.tsx +2 -2
  81. package/templates/react-dapp-ts/src/libs/api.ts +5 -12
  82. package/templates/react-dapp-ts/src/pages/home.css +45 -0
  83. package/templates/react-dapp-ts/src/pages/home.tsx +42 -15
  84. package/templates/react-dapp-ts/tsconfig.api.json +4 -1
  85. package/templates/react-dapp-ts/tsconfig.eslint.json +3 -1
  86. package/templates/react-gun-dapp/README.md +3 -3
  87. package/templates/react-gun-dapp/api/hooks/pre-start.js +2 -1
  88. package/templates/react-gun-dapp/api/index.js +1 -0
  89. package/templates/react-gun-dapp/blocklet.yml +1 -1
  90. package/templates/react-gun-dapp/index.html +14 -11
  91. package/templates/react-gun-dapp/package.json +31 -28
  92. package/templates/react-gun-dapp/src/app.jsx +1 -1
  93. package/templates/react-gun-dapp/src/libs/api.js +1 -1
  94. package/templates/react-gun-dapp/src/pages/about.jsx +5 -1
  95. package/templates/react-gun-dapp/src/pages/home.jsx +5 -1
  96. package/templates/react-static/README.md +3 -3
  97. package/templates/react-static/blocklet.yml +1 -1
  98. package/templates/react-static/index.html +14 -11
  99. package/templates/react-static/package.json +20 -18
  100. package/templates/react-static/src/app.jsx +1 -5
  101. package/templates/react-static/src/assets/blocklet.svg +16 -0
  102. package/templates/react-static/src/assets/react.svg +1 -0
  103. package/templates/react-static/src/assets/vite.svg +1 -0
  104. package/templates/react-static/src/index.css +68 -0
  105. package/templates/react-static/src/index.jsx +1 -0
  106. package/templates/react-static/src/pages/home.css +45 -0
  107. package/templates/react-static/src/pages/home.jsx +30 -15
  108. package/templates/react-static/template-info.json +6 -3
  109. package/templates/solidjs-dapp/.eslintrc.js +2 -1
  110. package/templates/solidjs-dapp/README.md +3 -3
  111. package/templates/solidjs-dapp/api/hooks/pre-start.js +2 -1
  112. package/templates/solidjs-dapp/api/index.js +1 -0
  113. package/templates/solidjs-dapp/api/routes/index.js +6 -0
  114. package/templates/solidjs-dapp/blocklet.yml +4 -2
  115. package/templates/solidjs-dapp/index.html +15 -12
  116. package/templates/solidjs-dapp/package.json +34 -30
  117. package/templates/solidjs-dapp/src/App.jsx +15 -3
  118. package/templates/solidjs-dapp/src/App.module.css +7 -1
  119. package/templates/solidjs-dapp/src/assets/blocklet.svg +16 -0
  120. package/templates/{solidjs-static/src/logo.svg → solidjs-dapp/src/assets/solidjs.svg} +1 -1
  121. package/templates/solidjs-dapp/src/index.css +21 -5
  122. package/templates/solidjs-dapp/src/libs/api.js +7 -0
  123. package/templates/solidjs-dapp/template-info.json +2 -2
  124. package/templates/solidjs-static/.eslintrc.js +4 -0
  125. package/templates/solidjs-static/README.md +3 -3
  126. package/templates/solidjs-static/blocklet.yml +1 -1
  127. package/templates/solidjs-static/index.html +15 -12
  128. package/templates/solidjs-static/package.json +22 -21
  129. package/templates/solidjs-static/src/App.jsx +7 -3
  130. package/templates/solidjs-static/src/App.module.css +7 -1
  131. package/templates/solidjs-static/src/assets/blocklet.svg +16 -0
  132. package/templates/solidjs-static/src/index.css +3 -5
  133. package/templates/solidjs-static/template-info.json +2 -2
  134. package/templates/svelte-dapp/README.md +3 -4
  135. package/templates/svelte-dapp/api/hooks/pre-start.js +2 -1
  136. package/templates/svelte-dapp/api/index.js +1 -0
  137. package/templates/svelte-dapp/api/routes/index.js +6 -0
  138. package/templates/svelte-dapp/blocklet.yml +1 -1
  139. package/templates/svelte-dapp/index.html +13 -10
  140. package/templates/svelte-dapp/jsconfig.json +9 -7
  141. package/templates/svelte-dapp/package.json +29 -29
  142. package/templates/svelte-dapp/src/App.svelte +45 -42
  143. package/templates/svelte-dapp/src/app.css +79 -0
  144. package/templates/svelte-dapp/src/assets/blocklet.svg +16 -0
  145. package/templates/svelte-dapp/src/assets/svelte.svg +1 -0
  146. package/templates/svelte-dapp/src/assets/vite.svg +1 -0
  147. package/templates/svelte-dapp/src/components/Counter.svelte +10 -0
  148. package/templates/svelte-dapp/src/libs/api.js +7 -0
  149. package/templates/svelte-dapp/src/main.js +1 -0
  150. package/templates/svelte-dapp/template-info.json +2 -2
  151. package/templates/svelte-dapp/vite.config.mjs +6 -1
  152. package/templates/svelte-static/README.md +3 -4
  153. package/templates/svelte-static/blocklet.yml +1 -1
  154. package/templates/svelte-static/index.html +13 -10
  155. package/templates/svelte-static/jsconfig.json +9 -7
  156. package/templates/svelte-static/package.json +18 -22
  157. package/templates/svelte-static/src/App.svelte +36 -43
  158. package/templates/svelte-static/src/app.css +79 -0
  159. package/templates/svelte-static/src/assets/blocklet.svg +16 -0
  160. package/templates/svelte-static/src/assets/svelte.svg +1 -0
  161. package/templates/svelte-static/src/assets/vite.svg +1 -0
  162. package/templates/svelte-static/src/components/Counter.svelte +10 -0
  163. package/templates/svelte-static/src/main.js +1 -0
  164. package/templates/svelte-static/template-info.json +6 -3
  165. package/templates/svelte-static/vite.config.mjs +6 -1
  166. package/templates/todo-list-example/.eslintrc.js +1 -1
  167. package/templates/todo-list-example/api/src/hooks/pre-start.ts +2 -1
  168. package/templates/todo-list-example/api/src/routes/todo-list/$get.ts +1 -1
  169. package/templates/todo-list-example/api/src/routes/todo-list/$put.ts +1 -1
  170. package/templates/todo-list-example/blocklet.yml +7 -5
  171. package/templates/todo-list-example/index.html +14 -11
  172. package/templates/todo-list-example/package.json +44 -41
  173. package/templates/todo-list-example/src/components/layout.tsx +1 -1
  174. package/templates/todo-list-example/src/libs/api.ts +5 -12
  175. package/templates/todo-list-example/src/logo.svg +1 -1
  176. package/templates/todo-list-example/src/pages/required-login.tsx +3 -6
  177. package/templates/todo-list-example/src/pages/todo-list.css +72 -68
  178. package/templates/todo-list-example/src/pages/todo-list.tsx +32 -32
  179. package/templates/todo-list-example/template-info.json +1 -1
  180. package/templates/todo-list-example/tsconfig.api.json +4 -1
  181. package/templates/todo-list-example/tsconfig.eslint.json +3 -1
  182. package/templates/vue-dapp/README.md +3 -3
  183. package/templates/vue-dapp/api/hooks/pre-start.js +2 -1
  184. package/templates/vue-dapp/api/index.js +1 -0
  185. package/templates/vue-dapp/api/routes/index.js +6 -0
  186. package/templates/vue-dapp/blocklet.yml +1 -1
  187. package/templates/vue-dapp/index.html +14 -11
  188. package/templates/vue-dapp/package.json +32 -28
  189. package/templates/vue-dapp/src/App.vue +26 -19
  190. package/templates/vue-dapp/src/assets/blocklet.svg +16 -0
  191. package/templates/vue-dapp/src/assets/vite.svg +1 -0
  192. package/templates/vue-dapp/src/assets/vue.svg +1 -0
  193. package/templates/vue-dapp/src/components/HelloWorld.vue +25 -15
  194. package/templates/vue-dapp/src/libs/api.js +5 -12
  195. package/templates/vue-dapp/src/main.js +1 -0
  196. package/templates/vue-dapp/src/style.css +79 -0
  197. package/templates/vue-dapp/template-info.json +2 -2
  198. package/templates/vue-static/README.md +3 -3
  199. package/templates/vue-static/blocklet.yml +1 -1
  200. package/templates/vue-static/index.html +14 -11
  201. package/templates/vue-static/package.json +20 -19
  202. package/templates/vue-static/src/App.vue +27 -12
  203. package/templates/vue-static/src/assets/blocklet.svg +16 -0
  204. package/templates/vue-static/src/assets/vite.svg +1 -0
  205. package/templates/vue-static/src/assets/vue.svg +1 -0
  206. package/templates/vue-static/src/components/HelloWorld.vue +15 -15
  207. package/templates/vue-static/src/main.js +1 -0
  208. package/templates/vue-static/src/style.css +79 -0
  209. package/templates/vue-static/template-info.json +6 -3
  210. package/templates/vue2-dapp/README.md +3 -3
  211. package/templates/vue2-dapp/api/hooks/pre-start.js +2 -1
  212. package/templates/vue2-dapp/api/index.js +1 -0
  213. package/templates/vue2-dapp/blocklet.yml +1 -1
  214. package/templates/vue2-dapp/index.html +14 -11
  215. package/templates/vue2-dapp/package.json +30 -27
  216. package/templates/vue2-dapp/src/libs/api.js +1 -1
  217. package/templates/vue2-dapp/template-info.json +2 -2
  218. package/templates/vue2-static/README.md +3 -3
  219. package/templates/vue2-static/blocklet.yml +1 -1
  220. package/templates/vue2-static/index.html +14 -11
  221. package/templates/vue2-static/package.json +19 -18
  222. package/templates/vue2-static/template-info.json +6 -3
  223. package/common/.husky/pre-commit +0 -4
  224. package/common/scripts/build-clean.js +0 -5
  225. package/templates/express-api/.env +0 -1
  226. package/templates/monorepo/.husky/pre-commit +0 -4
  227. package/templates/react-dapp/src/app.css +0 -30
  228. package/templates/react-dapp/src/logo.svg +0 -1
  229. package/templates/react-dapp/src/pages/about.jsx +0 -16
  230. package/templates/react-dapp-ts/src/app.css +0 -30
  231. package/templates/react-dapp-ts/src/logo.svg +0 -1
  232. package/templates/react-dapp-ts/src/pages/about.tsx +0 -16
  233. package/templates/react-static/src/app.css +0 -30
  234. package/templates/react-static/src/logo.svg +0 -1
  235. package/templates/react-static/src/pages/about.jsx +0 -16
  236. package/templates/svelte-dapp/.eslintrc.js +0 -22
  237. package/templates/svelte-dapp/src/assets/svelte.png +0 -0
  238. package/templates/svelte-dapp/src/lib/Counter.svelte +0 -34
  239. package/templates/svelte-static/.eslintrc.js +0 -22
  240. package/templates/svelte-static/src/assets/svelte.png +0 -0
  241. package/templates/svelte-static/src/lib/Counter.svelte +0 -34
  242. package/templates/todo-list-example/.editorconfig +0 -23
  243. package/templates/todo-list-example/.github/workflows/main.yml +0 -36
  244. package/templates/todo-list-example/.github/workflows/pr-title.yml +0 -21
  245. package/templates/todo-list-example/.github/workflows/version-check.yml +0 -20
  246. package/templates/todo-list-example/.husky/pre-commit +0 -4
  247. package/templates/todo-list-example/.prettierrc +0 -9
  248. package/templates/todo-list-example/logo.png +0 -0
  249. package/templates/todo-list-example/public/.gitkeep +0 -0
  250. package/templates/todo-list-example/screenshots/.gitkeep +0 -0
  251. package/templates/todo-list-example/scripts/build-clean.js +0 -5
  252. package/templates/todo-list-example/scripts/bump-version.mjs +0 -35
  253. package/templates/vue-static/src/assets/logo.png +0 -0
  254. /package/templates/monorepo/{eslintrc.js → .eslintrc.js} +0 -0
  255. /package/templates/{solidjs-dapp/src/logo.svg → solidjs-static/src/assets/solidjs.svg} +0 -0
@@ -1,29 +1,36 @@
1
1
  <script setup>
2
- import { ref } from 'vue';
3
- // This starter template is using Vue 3 <script setup> SFCs
4
- // Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
5
2
  import HelloWorld from './components/HelloWorld.vue';
6
-
7
- const msg = ref('Hello Vue 3 + Vite');
8
3
  </script>
9
4
 
10
5
  <template>
11
- <img alt="Vue logo" src="./assets/logo.png" />
12
- <HelloWorld :msg="msg" />
13
- <div :style="{ display: 'flex', justifyContent: 'center' }">
14
- <pre :style="{ textAlign: 'left' }">
15
- <code>{{ JSON.stringify(window?.blocklet, null, 2) }}</code>
16
- </pre>
6
+ <div>
7
+ <a href="https://vitejs.dev" target="_blank">
8
+ <img src="./assets/vite.svg" class="logo" alt="Vite logo" />
9
+ </a>
10
+ <a href="https://vuejs.org" target="_blank">
11
+ <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
12
+ </a>
13
+ <a href="https://www.arcblock.io/docs/blocklet-developer/getting-started" target="_blank">
14
+ <img src="./assets/blocklet.svg" class="logo blocklet" alt="Blocklet logo" />
15
+ </a>
17
16
  </div>
17
+ <HelloWorld msg="Vite + Vue + Blocklet" />
18
18
  </template>
19
19
 
20
- <style>
21
- #app {
22
- font-family: Avenir, Helvetica, Arial, sans-serif;
23
- -webkit-font-smoothing: antialiased;
24
- -moz-osx-font-smoothing: grayscale;
25
- text-align: center;
26
- color: #2c3e50;
27
- margin-top: 60px;
20
+ <style scoped>
21
+ .logo {
22
+ height: 6em;
23
+ padding: 1.5em;
24
+ will-change: filter;
25
+ transition: filter 300ms;
26
+ }
27
+ .logo:hover {
28
+ filter: drop-shadow(0 0 2em #646cffaa);
29
+ }
30
+ .logo.vue:hover {
31
+ filter: drop-shadow(0 0 2em #42b883aa);
32
+ }
33
+ .logo.blocklet:hover {
34
+ filter: drop-shadow(0 0 2em #22cdcdaa);
28
35
  }
29
36
  </style>
@@ -0,0 +1,16 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_2412_13557)"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_2412_13557)"/>
4
+ <defs>
5
+ <linearGradient id="paint0_linear_2412_13557" x1="31.72" y1="95.7208" x2="95.488" y2="34.3249" gradientUnits="userSpaceOnUse">
6
+ <stop stop-color="#0FA4B7"/>
7
+ <stop offset="0.494757" stop-color="#1DC1C7"/>
8
+ <stop offset="1" stop-color="#2BE0D7"/>
9
+ </linearGradient>
10
+ <linearGradient id="paint1_linear_2412_13557" x1="28.4374" y1="99.2464" x2="98.7613" y2="44.9372" gradientUnits="userSpaceOnUse">
11
+ <stop stop-color="#0FA4B7"/>
12
+ <stop offset="0.494757" stop-color="#1DC1C7"/>
13
+ <stop offset="1" stop-color="#2BE0D7"/>
14
+ </linearGradient>
15
+ </defs>
16
+ <div xmlns="" mx-name="view-image-info"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -1,38 +1,48 @@
1
1
  <script setup>
2
2
  import { ref } from 'vue';
3
+ import api from '../libs/api';
3
4
 
4
5
  defineProps({
5
6
  msg: String,
6
7
  });
7
8
 
8
9
  const count = ref(0);
10
+
11
+ async function getApiData() {
12
+ const { data } = await api.get('/api/data');
13
+ const { message } = data;
14
+ alert(`Message from api: ${message}`);
15
+ }
9
16
  </script>
10
17
 
11
18
  <template>
12
19
  <h1>{{ msg }}</h1>
13
20
 
14
- <p>
15
- Recommended IDE setup:
16
- <a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
17
- +
18
- <a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
19
- </p>
21
+ <div class="card">
22
+ <button type="button" @click="count++">count is {{ count }}</button>
23
+ <br />
24
+ <br />
25
+ <button type="button" @click="getApiData">Get API Data</button>
26
+ <p>
27
+ Edit
28
+ <code>components/HelloWorld.vue</code> to test HMR
29
+ </p>
30
+ </div>
20
31
 
21
32
  <p>
22
- <a href="https://vitejs.dev/guide/features.html" target="_blank"> Vite Documentation </a>
23
- |
24
- <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
33
+ Check out
34
+ <a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the official Vue + Vite
35
+ starter
25
36
  </p>
26
-
27
- <button type="button" @click="count++">count is: {{ count }}</button>
28
37
  <p>
29
- Edit
30
- <code>components/HelloWorld.vue</code> to test hot module replacement.
38
+ Learn more about IDE Support for Vue in the
39
+ <a href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support" target="_blank">Vue Docs Scaling up Guide</a>.
31
40
  </p>
41
+ <p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
32
42
  </template>
33
43
 
34
44
  <style scoped>
35
- a {
36
- color: #42b983;
45
+ .read-the-docs {
46
+ color: #888;
37
47
  }
38
48
  </style>
@@ -1,14 +1,7 @@
1
- import axios from 'axios';
1
+ import { createAxios } from '@blocklet/js-sdk';
2
2
 
3
- axios.interceptors.request.use(
4
- (config) => {
5
- const prefix = window.blocklet ? window.blocklet.prefix : '/';
6
- config.baseURL = prefix || '';
7
- config.timeout = 200000;
3
+ const api = createAxios({
4
+ baseURL: window?.blocklet?.prefix || '/',
5
+ });
8
6
 
9
- return config;
10
- },
11
- (error) => Promise.reject(error)
12
- );
13
-
14
- export default axios;
7
+ export default api;
@@ -1,4 +1,5 @@
1
1
  import { createApp } from 'vue';
2
+ import './style.css';
2
3
  import App from './App.vue';
3
4
 
4
5
  createApp(App).mount('#app');
@@ -0,0 +1,79 @@
1
+ :root {
2
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ line-height: 1.5;
4
+ font-weight: 400;
5
+
6
+ color-scheme: light dark;
7
+ color: rgba(255, 255, 255, 0.87);
8
+ background-color: #242424;
9
+
10
+ font-synthesis: none;
11
+ text-rendering: optimizeLegibility;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ a {
17
+ font-weight: 500;
18
+ color: #646cff;
19
+ text-decoration: inherit;
20
+ }
21
+ a:hover {
22
+ color: #535bf2;
23
+ }
24
+
25
+ body {
26
+ margin: 0;
27
+ display: flex;
28
+ place-items: center;
29
+ min-width: 320px;
30
+ min-height: 100vh;
31
+ }
32
+
33
+ h1 {
34
+ font-size: 3.2em;
35
+ line-height: 1.1;
36
+ }
37
+
38
+ button {
39
+ border-radius: 8px;
40
+ border: 1px solid transparent;
41
+ padding: 0.6em 1.2em;
42
+ font-size: 1em;
43
+ font-weight: 500;
44
+ font-family: inherit;
45
+ background-color: #1a1a1a;
46
+ cursor: pointer;
47
+ transition: border-color 0.25s;
48
+ }
49
+ button:hover {
50
+ border-color: #646cff;
51
+ }
52
+ button:focus,
53
+ button:focus-visible {
54
+ outline: 4px auto -webkit-focus-ring-color;
55
+ }
56
+
57
+ .card {
58
+ padding: 2em;
59
+ }
60
+
61
+ #app {
62
+ max-width: 1280px;
63
+ margin: 0 auto;
64
+ padding: 2rem;
65
+ text-align: center;
66
+ }
67
+
68
+ @media (prefers-color-scheme: light) {
69
+ :root {
70
+ color: #213547;
71
+ background-color: #ffffff;
72
+ }
73
+ a:hover {
74
+ color: #747bff;
75
+ }
76
+ button {
77
+ background-color: #f9f9f9;
78
+ }
79
+ }
@@ -8,5 +8,5 @@
8
8
  "composable": true,
9
9
  "languages": "JavaScript",
10
10
  "useCase": "Starter",
11
- "author": "ZhangHan"
12
- }
11
+ "author": "Blocklet"
12
+ }
@@ -31,14 +31,14 @@ This blocklet is a static project, which means this is a frontend application. I
31
31
 
32
32
  Blocklet needs blocklet server as a dependency. So you need to install it first.
33
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)
34
+ See details in [https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli](https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli)
35
35
 
36
36
  2. Init blocklet server & start blocklet server
37
37
 
38
38
  Before starting an blocklet server, you need to init blocklet server.
39
39
  `blocklet server init --mode=debug`
40
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)
41
+ See details in [https://www.arcblock.io/docs/blocklet-developer/getting-started](https://www.arcblock.io/docs/blocklet-developer/getting-started)
42
42
 
43
43
  3. Go to the project directory `cd [name]`
44
44
  4. Install dependencies: `npm install` or `yarn`
@@ -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://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
141
+ - Full document of Blocklet Server & blocklet development: [https://www.arcblock.io/docs/blocklet-developer](https://www.arcblock.io/docs/blocklet-developer)
142
142
 
143
143
  ## License
144
144
 
@@ -13,7 +13,7 @@ author:
13
13
  repository:
14
14
  type: git
15
15
  url: 'git+https://github.com/blocklet/create-blocklet.git'
16
- specVersion: 1.1.1
16
+ specVersion: 1.2.8
17
17
  version: 0.1.0
18
18
  logo: logo.png
19
19
  files:
@@ -1,14 +1,17 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" href="/favicon.ico?imageFilter=convert&f=png&w=32" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
7
- <meta name="theme-color" content="#4F6AF5" />
8
- </head>
9
- <body>
10
- <noscript>You need to enable JavaScript to run this app.</noscript>
11
- <div id="app"></div>
12
- <script type="module" src="/src/main.js"></script>
13
- </body>
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <link rel="icon" href="/favicon.ico?imageFilter=convert&f=png&w=32" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+ <meta name="theme-color" content="#4F6AF5" />
9
+ </head>
10
+
11
+ <body>
12
+ <noscript>You need to enable JavaScript to run this app.</noscript>
13
+ <div id="app"></div>
14
+ <script type="module" src="/src/main.js"></script>
15
+ </body>
16
+
14
17
  </html>
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "template-vue",
2
+ "name": "template-vue-static",
3
3
  "version": "0.1.0",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev",
@@ -7,32 +7,30 @@
7
7
  "lint": "eslint src --ext .mjs,.js,.vue",
8
8
  "lint:fix": "npm run lint -- --fix",
9
9
  "serve": "vite preview",
10
- "clean": "node scripts/build-clean.js",
10
+ "clean": "node scripts/build-clean.mjs",
11
11
  "bundle": "npm run clean && vite build && blocklet bundle --zip --create-release",
12
12
  "deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
13
13
  "upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
14
14
  "deploy:child": "npm run bundle && blocklet deploy .blocklet/bundle --app-did=<%= did %>",
15
15
  "dev:child": "blocklet dev --component --app-did=<%= did %>",
16
- "prepare": "husky install",
16
+ "prepare": "npx simple-git-hooks",
17
17
  "bump-version": "zx --quiet scripts/bump-version.mjs"
18
18
  },
19
- "dependencies": {
20
- "vue": "^3.3.13"
21
- },
22
19
  "devDependencies": {
23
- "@vitejs/plugin-vue": "^4.5.2",
24
- "bumpp": "^8.2.1",
25
- "eslint": "^8.56.0",
26
- "eslint-config-prettier": "^8.10.0",
27
- "eslint-plugin-prettier": "^5.1.0",
28
- "eslint-plugin-vue": "^9.19.2",
29
- "husky": "^8.0.3",
30
- "lint-staged": "^12.5.0",
31
- "prettier": "^3.1.1",
32
- "rimraf": "^3.0.2",
33
- "vite": "^5.0.10",
34
- "vite-plugin-blocklet": "^0.7.9",
35
- "zx": "^7.2.3"
20
+ "@vitejs/plugin-vue": "^5.0.5",
21
+ "bumpp": "^9.4.1",
22
+ "eslint": "^8.57.0",
23
+ "eslint-config-prettier": "^9.1.0",
24
+ "eslint-plugin-prettier": "^5.1.3",
25
+ "eslint-plugin-vue": "^9.26.0",
26
+ "lint-staged": "^15.2.7",
27
+ "prettier": "^3.3.2",
28
+ "rimraf": "^5.0.7",
29
+ "simple-git-hooks": "^2.11.1",
30
+ "vite": "^5.3.2",
31
+ "vite-plugin-blocklet": "^0.8.1",
32
+ "vue": "^3.4.31",
33
+ "zx": "^8.1.3"
36
34
  },
37
35
  "lint-staged": {
38
36
  "*.{mjs,js,vue}": [
@@ -42,5 +40,8 @@
42
40
  "*.{css,less,scss,json,graphql}": [
43
41
  "prettier --write"
44
42
  ]
43
+ },
44
+ "simple-git-hooks": {
45
+ "pre-commit": "npx lint-staged"
45
46
  }
46
47
  }
@@ -1,21 +1,36 @@
1
1
  <script setup>
2
- // This starter template is using Vue 3 <script setup> SFCs
3
- // Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
4
2
  import HelloWorld from './components/HelloWorld.vue';
5
3
  </script>
6
4
 
7
5
  <template>
8
- <img alt="Vue logo" src="./assets/logo.png" />
9
- <HelloWorld msg="Hello Vue 3 + Vite" />
6
+ <div>
7
+ <a href="https://vitejs.dev" target="_blank">
8
+ <img src="./assets/vite.svg" class="logo" alt="Vite logo" />
9
+ </a>
10
+ <a href="https://vuejs.org" target="_blank">
11
+ <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
12
+ </a>
13
+ <a href="https://www.arcblock.io/docs/blocklet-developer/getting-started" target="_blank">
14
+ <img src="./assets/blocklet.svg" class="logo blocklet" alt="Blocklet logo" />
15
+ </a>
16
+ </div>
17
+ <HelloWorld msg="Vite + Vue + Blocklet" />
10
18
  </template>
11
19
 
12
- <style>
13
- #app {
14
- font-family: Avenir, Helvetica, Arial, sans-serif;
15
- -webkit-font-smoothing: antialiased;
16
- -moz-osx-font-smoothing: grayscale;
17
- text-align: center;
18
- color: #2c3e50;
19
- margin-top: 60px;
20
+ <style scoped>
21
+ .logo {
22
+ height: 6em;
23
+ padding: 1.5em;
24
+ will-change: filter;
25
+ transition: filter 300ms;
26
+ }
27
+ .logo:hover {
28
+ filter: drop-shadow(0 0 2em #646cffaa);
29
+ }
30
+ .logo.vue:hover {
31
+ filter: drop-shadow(0 0 2em #42b883aa);
32
+ }
33
+ .logo.blocklet:hover {
34
+ filter: drop-shadow(0 0 2em #22cdcdaa);
20
35
  }
21
36
  </style>
@@ -0,0 +1,16 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_2412_13557)"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_2412_13557)"/>
4
+ <defs>
5
+ <linearGradient id="paint0_linear_2412_13557" x1="31.72" y1="95.7208" x2="95.488" y2="34.3249" gradientUnits="userSpaceOnUse">
6
+ <stop stop-color="#0FA4B7"/>
7
+ <stop offset="0.494757" stop-color="#1DC1C7"/>
8
+ <stop offset="1" stop-color="#2BE0D7"/>
9
+ </linearGradient>
10
+ <linearGradient id="paint1_linear_2412_13557" x1="28.4374" y1="99.2464" x2="98.7613" y2="44.9372" gradientUnits="userSpaceOnUse">
11
+ <stop stop-color="#0FA4B7"/>
12
+ <stop offset="0.494757" stop-color="#1DC1C7"/>
13
+ <stop offset="1" stop-color="#2BE0D7"/>
14
+ </linearGradient>
15
+ </defs>
16
+ <div xmlns="" mx-name="view-image-info"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -11,28 +11,28 @@ const count = ref(0);
11
11
  <template>
12
12
  <h1>{{ msg }}</h1>
13
13
 
14
- <p>
15
- Recommended IDE setup:
16
- <a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
17
- +
18
- <a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
19
- </p>
14
+ <div class="card">
15
+ <button type="button" @click="count++">count is {{ count }}</button>
16
+ <p>
17
+ Edit
18
+ <code>components/HelloWorld.vue</code> to test HMR
19
+ </p>
20
+ </div>
20
21
 
21
22
  <p>
22
- <a href="https://vitejs.dev/guide/features.html" target="_blank"> Vite Documentation </a>
23
- |
24
- <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
23
+ Check out
24
+ <a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the official Vue + Vite
25
+ starter
25
26
  </p>
26
-
27
- <button type="button" @click="count++">count is: {{ count }}</button>
28
27
  <p>
29
- Edit
30
- <code>components/HelloWorld.vue</code> to test hot module replacement.
28
+ Learn more about IDE Support for Vue in the
29
+ <a href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support" target="_blank">Vue Docs Scaling up Guide</a>.
31
30
  </p>
31
+ <p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
32
32
  </template>
33
33
 
34
34
  <style scoped>
35
- a {
36
- color: #42b983;
35
+ .read-the-docs {
36
+ color: #888;
37
37
  }
38
38
  </style>
@@ -1,4 +1,5 @@
1
1
  import { createApp } from 'vue';
2
+ import './style.css';
2
3
  import App from './App.vue';
3
4
 
4
5
  createApp(App).mount('#app');
@@ -0,0 +1,79 @@
1
+ :root {
2
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ line-height: 1.5;
4
+ font-weight: 400;
5
+
6
+ color-scheme: light dark;
7
+ color: rgba(255, 255, 255, 0.87);
8
+ background-color: #242424;
9
+
10
+ font-synthesis: none;
11
+ text-rendering: optimizeLegibility;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ a {
17
+ font-weight: 500;
18
+ color: #646cff;
19
+ text-decoration: inherit;
20
+ }
21
+ a:hover {
22
+ color: #535bf2;
23
+ }
24
+
25
+ body {
26
+ margin: 0;
27
+ display: flex;
28
+ place-items: center;
29
+ min-width: 320px;
30
+ min-height: 100vh;
31
+ }
32
+
33
+ h1 {
34
+ font-size: 3.2em;
35
+ line-height: 1.1;
36
+ }
37
+
38
+ button {
39
+ border-radius: 8px;
40
+ border: 1px solid transparent;
41
+ padding: 0.6em 1.2em;
42
+ font-size: 1em;
43
+ font-weight: 500;
44
+ font-family: inherit;
45
+ background-color: #1a1a1a;
46
+ cursor: pointer;
47
+ transition: border-color 0.25s;
48
+ }
49
+ button:hover {
50
+ border-color: #646cff;
51
+ }
52
+ button:focus,
53
+ button:focus-visible {
54
+ outline: 4px auto -webkit-focus-ring-color;
55
+ }
56
+
57
+ .card {
58
+ padding: 2em;
59
+ }
60
+
61
+ #app {
62
+ max-width: 1280px;
63
+ margin: 0 auto;
64
+ padding: 2rem;
65
+ text-align: center;
66
+ }
67
+
68
+ @media (prefers-color-scheme: light) {
69
+ :root {
70
+ color: #213547;
71
+ background-color: #ffffff;
72
+ }
73
+ a:hover {
74
+ color: #747bff;
75
+ }
76
+ button {
77
+ background-color: #f9f9f9;
78
+ }
79
+ }
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "vue-static",
3
- "desc": { "en": "A front-end application skeleton built with Vue 3", "zh": "一个基于 Vue 3 构建的前端应用骨架" },
3
+ "desc": {
4
+ "en": "A front-end application skeleton built with Vue 3",
5
+ "zh": "一个基于 Vue 3 构建的前端应用骨架"
6
+ },
4
7
  "blockletType": "static",
5
8
  "composable": true,
6
9
  "languages": "JavaScript",
7
10
  "useCase": "Starter",
8
- "author": "ZhangHan"
9
- }
11
+ "author": "Blocklet"
12
+ }