Hello, world!
We will create our first block: a simple “Hello!” block that will return the string “World!”
Creating a block
Section titled “Creating a block”Clippy blocks are EMCAScript modules. The def property is where you put your block’s JavaScript / TypeScript code, and all other
properties are used by TurboWarp.
Create a file called src/blocks/hello.js with this code:
export default { title: 'Hello!', blockType: Scratch.BlockType.REPORTER, def() { return 'World!' },}We recommend snake_case or camelCase for all block filenames.
For example: if your block is called “turn around”, you might call its definition turnAround.js or turn_around.js.
Try your extension
Section titled “Try your extension”Run clippy dev and go to http://localhost:8000 to open the TurboWarp editor with your extension automatically loaded.