mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-28 07:10:27 -04:00
add require
lines for arg/block types in getInfo
intro snippet
This commit is contained in:
parent
99f6c7b6a0
commit
519a37bb00
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ All extensions must define a function called `getInfo` which returns an object t
|
||||||
render both the blocks and the extension itself.
|
render both the blocks and the extension itself.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
// Core, Team, and Official extensions can `require` VM code:
|
||||||
|
const ArgumentType = require('../../extension-support/argument-type');
|
||||||
|
const BlockType = require('../../extension-support/block-type');
|
||||||
|
|
||||||
class SomeBlocks {
|
class SomeBlocks {
|
||||||
// ...
|
// ...
|
||||||
getInfo () {
|
getInfo () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue