Skip to content

Commit

Permalink
fix: Make block-extension-tooltip build successfully (#983)
Browse files Browse the repository at this point in the history
* fix: Make tooltip plugin build successfully

* fix: add todo for import

* chore: make block-extension
-tooltip private for now
  • Loading branch information
maribethb authored Jan 25, 2022
1 parent 7afdc9f commit 7805603
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions plugins/block-extension-tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"prepublishOnly": "npm run clean && npm run dist",
"start": "blockly-scripts start"
},
"private": true,
"main": "./dist/index.js",
"module": "./src/index.js",
"unpkg": "./dist/index.js",
Expand Down
6 changes: 5 additions & 1 deletion plugins/block-extension-tooltip/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
* @fileoverview Custom tooltip block extension.
* @author samelh@google.com (Sam El-Husseini)
*/
import * as Blockly from 'blockly/core';

// TODO(maribethb): This should be from 'blockly/core'; fix asap when this
// plugin is made compatible with v7 of Blockly.
// See https://github.com/google/blockly-samples/issues/805
import * as Blockly from 'blockly';
import './tooltip_monkey_patch';

type TooltipRender = (block: Blockly.BlockSvg) => HTMLElement;
Expand Down
6 changes: 5 additions & 1 deletion plugins/block-extension-tooltip/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"target": "es5",
"allowJs": true,
"sourceMap": true,
"lib": ["es6", "dom"]
"lib": ["es6", "dom"],
// Tell tsc to use the version of blockly local to this plugin.
// See https://github.com/google/blockly-samples/issues/805
"baseUrl": ".",
"paths": {"blockly": ["node_modules/blockly"]}
},
"include": [
"src", "test"
Expand Down

0 comments on commit 7805603

Please sign in to comment.