You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

block-template-html

Package Overview
Dependencies
Maintainers
6
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

block-template-html - npm Package Compare versions

Comparing version

to
0.1.3

8

CHANGELOG.md
# block-template-html
## 0.1.3
### Patch Changes
- [#598](https://github.com/blockprotocol/blockprotocol/pull/598) [`8154e59`](https://github.com/blockprotocol/blockprotocol/commit/8154e59c29de21a2a831f6a0536a6f1ec265d10c) Thanks [@CiaranMn](https://github.com/CiaranMn)! - add explanatory comments and simplify template. add 'format' command
- [#601](https://github.com/blockprotocol/blockprotocol/pull/601) [`ccc0ecc`](https://github.com/blockprotocol/blockprotocol/commit/ccc0ecc5c0523205b4724b6e5813699a2e3f0df7) Thanks [@kachkaev](https://github.com/kachkaev)! - Update `devDependencies`
## 0.1.2

@@ -4,0 +12,0 @@

10

package.json
{
"name": "block-template-html",
"version": "0.1.2",
"version": "0.1.3",
"description": "Block Protocol block template for an html-based block",

@@ -23,12 +23,18 @@ "keywords": [

"dev": "echo \"Serving at http://localhost:63212\"; http-server -p 63212 ./dev",
"format": "prettier \"**/*\" --write --ignore-unknown",
"prepare": "rimraf ./dev/src; lnk -f ./src ./dev",
"serve": "block-scripts serve"
},
"prettier": {
"printWidth": 80,
"trailingComma": "all"
},
"dependencies": {},
"devDependencies": {
"block-scripts": "0.0.15",
"block-scripts": "0.0.16",
"http-server": "14.1.1",
"lnk-cli": "1.0.1",
"prettier": "2.7.1",
"rimraf": "^3.0.2"
}
}

6

README.md

@@ -21,5 +21,5 @@ # Block Protocol template: HTML

- run the dev server with `yarn dev`
- run the dev server with `yarn dev` (or `npm run dev`)
1. When finished, run `yarn build`, which:
1. When finished, run `yarn build` (or `npm run build`), which:

@@ -32,2 +32,4 @@ - Bundles the component into a single source file

You can format your code using `yarn format` (or `npm run format`).
N.B.

@@ -34,0 +36,0 @@

@@ -14,4 +14,10 @@ /* global blockprotocol */

element,
/**
* Here you can register functions will be called when your block receives specific messages from the application.
* The example here is handling 'blockEntity', which is the entity associated directly with this instance of the block.
* @see https://blockprotocol.org/docs/spec/graph-service#message-definitions for other such messages
*/
callbacks: {
blockEntity: (entity) => {
// Here we set entity to the blockEntity's entityId, so we can use to update the entity (in the 'change' listener below)
entityId = entity.data.entityId;

@@ -28,2 +34,11 @@

if (entityId) {
/**
* This is an example of using the graph service to send a message to the embedding application
* – this particular message asks the application update an entity's properties.
* The specific entity to update is identified by 'entityId'
* – we are passing the 'entityId' of the entity loaded into the block ('blockEntity').
*
* Many other messages are available for your block to read and update entities, and links between entities
* @see https://blockprotocol.org/docs/spec/graph-service#message-definitions
*/
handler

@@ -30,0 +45,0 @@ .updateEntity({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet