Skip to content

Commit

Permalink
fix usage (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem authored Jul 17, 2024
1 parent 4122b20 commit 547b71a
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,30 @@ Include the following script tags in your HTML:
<script src="https://cdn.jsdelivr.net/npm/near-bos-webcomponent@latest/dist/main.REPLACE_WITH_BUNDLE_HASH.bundle.js"></script>
```

Be sure to replace "REPLACE_WITH_BUNDLE_HASH" with the respective hash, which can be found via the asset-manifest:
Be sure to replace `REPLACE_WITH_BUNDLE_HASH` with the respective hash, which can be found via the asset-manifest:

<https://cdn.jsdelivr.net/npm/near-bos-webcomponent@latest/dist/asset-manifest.json>

</details>

<details>
<summary>Via NEARFS web4 gateway</summary>

Include the following script tags in your HTML:

```html
<script src="https://ipfs.web4.near.page/ipfs/REPLACE_WITH_NEARFS_CID/runtime.REPLACE_WITH_BUNDLE_HASH.bundle.js"></script>
<script src="https://ipfs.web4.near.page/ipfs/REPLACE_WITH_NEARFS_CID/main.REPLACE_WITH_BUNDLE_HASH.bundle.js"></script>
```

Be sure to replace `REPLACE_WITH_NEARFS_CID` with the cid you get from [publishing to nearfs](#publishing-to-nearfs) and replace `REPLACE_WITH_BUNDLE_HASH` with the respective hash, which can be found via the asset-manifest:

<https://ipfs.web4.near.page/ipfs/REPLACE_WITH_NEARFS_CID/asset-manifest.json>

</details>

<br />

Once included, you can use the web component in your HTML:

```html
Expand Down Expand Up @@ -66,9 +84,9 @@ To support specific features of the VM or an accompanying development server, pr
// Configuration options for the VM
"vm": {
"features": {
"enableComponentSrcDataKey": boolean, // adds the "data-component" attribute specifying the rendered component's "src"
}
}
"enableComponentSrcDataKey": boolean, // adds the "data-component" attribute specifying the rendered component's "src"
}
}
}
```

Expand Down

0 comments on commit 547b71a

Please sign in to comment.