Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

Create first blocklet

Tutorials
Blocklet Store
Product / Blocklet Server
Technology / Blocklet
ArcBlock
2023-09-08 09:05
· edited

Create Blocklet is an officially supported Blocklet creation tool that allows you to quickly create Blocklets and automatically add them to your project.

Preparation#

You must first have node and make sure the node version is 16.0 or above. (It is recommended to use nvm to manage node versions under mac)

Scaffolding#

Creating projects with the official tools

yarn create blocklet my-blocklet
# or npm create blocklet my-blocklet
# or pnpm create blocklet my-blocklet

Project creation via @blocklet/cli tool

blocklet create my-blocklet

Installing Dependencies#

yarn

yarn install v1.22.19
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.71s.

Launch Project#

yarn dev

Open the URL output from the console and you will see the currently launched project.

Deployment Release#

Bundle#

yarn bundle

Build the application as a code package that can be deployed to the Blocklet Server, or as an application package that can be uploaded to the Blocklet Store. The build product is generated by default to .blocklet

Deploy#

The current deployment supports two forms:

  1. directly through the deploy command
  2. Deploy by uploading to the Blocklet Store

Before publishing to the Blocklet Store, local validation can be done by deploying to a local Blocklet Server

yarn deploy

After running, you will see the application you just deployed in the list of cornerstone applications in your local Blocklet Server

Upload#

yarn upload

You can use this command to upload this to Blocklet Store, check documentation at here

What's next#



Sticker