Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10 standaard google blocks uit blocks repo verwijderen #34

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions blocks/arduino.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ const blocks = [
tooltip: "%{BKY_ARD_TIME_DELAY_TIP}",
helpUrl: "http://arduino.cc/en/Reference/Delay",
},
//definition is here because it is not in the default blockly blocks.
{
type: "controls_repeat_forever",
message0: "%{BKY_CONTROLS_REPEAT_FOREVER_TITLE}",
message1: "%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",
args1: [{ type: "input_statement", name: "DO" }],
previousStatement: null,
nextStatement: null,
style: "situation_blocks",
tooltip: "%{BKY_CONTROLS_REPEAT_TOOLTIP}",
helpUrl: "%{BKY_CONTROLS_REPEAT_HELPURL}",
},
// using this definition because the style is different from the default blockly blocks
{
type: "controls_if",
message0: "%{BKY_CONTROLS_IF_MSG_IF} %1 %{BKY_CONTROLS_IF_MSG_THEN} ",
args0: [{ type: "input_value", name: "IF0", check: "Boolean" }],
message1: "%1",
args1: [{ type: "input_statement", name: "DO0" }],
previousStatement: null,
nextStatement: null,
style: "situation_blocks",
helpUrl: "%{BKY_CONTROLS_IF_HELPURL}",
mutator: "controls_if_mutator",
extensions: ["controls_if_tooltip"],
},
];

export { blocks };
16 changes: 0 additions & 16 deletions blocks/blocks.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import * as colour from "./colour";
import * as lists from "./lists";
import * as logic from "./logic";
import * as loops from "./loops";
import * as math from "./math";
import * as texts from "./text";
import * as variables from "./variables";
import * as variablesDynamic from "./variables_dynamic";
import * as leaphyCommon from "./leaphy_common";
import * as leaphyOriginal from "./leaphy_original";
import * as leaphyFlitz from "./leaphy_flitz";
Expand Down Expand Up @@ -116,14 +108,6 @@ function getBlocks(boardType = "l_uno") {

// Add all blocks from each independent module in one list
const block = [
...colour.blocks,
...lists.blocks,
...logic.blocks,
...loops.blocks,
...math.blocks,
...texts.blocks,
...variables.blocks,
...variablesDynamic.blocks,
...leaphyCommon.default(board),
...leaphyOriginal.blocks,
...leaphyFlitz.blocks,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"blockly": "^10.1.3",
"blockly": "^10.3.0",
"typescript": "4.3.2"
},
"devDependencies": {
Expand All @@ -23,8 +23,8 @@
"generators",
"msg",
"theme"
],
"version": "1.7.1",
],
"version": "2.0.0",
"description": "Leaphy custom Blockly blocks and arduino code generator",
"name": "@leaphy-robotics/leaphy-blocks"
}
3 changes: 3 additions & 0 deletions theme/theme.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const defaultBlockStyles = {
'leaphy_blocks': {'colourPrimary': '#06778f', 'hat': 'cap'},
'situation_blocks': {'colourPrimary': '#D9B53F'},
'loop_blocks': {'colourPrimary': '#D9B53F'},
'numbers_blocks': {'colourPrimary': '#75B342'},
'logic_blocks': {'colourPrimary': '#75B342'},
'math_blocks': {'colourPrimary': '#75B342'},
'variable_blocks': {'colourPrimary': '#DE7C3B'},
'procedure_blocks': {'colourPrimary': '#4095CE'},
};
Expand Down