Update(boards): 所有板卡执行 build:prod
This commit is contained in:
@@ -208,17 +208,17 @@ export const controls_if = {
|
||||
var elseStatementConnection = null;
|
||||
while (clauseBlock) {
|
||||
switch (clauseBlock.type) {
|
||||
case 'controls_if_elseif':
|
||||
this.elseifCount_++;
|
||||
valueConnections.push(clauseBlock.valueConnection_);
|
||||
statementConnections.push(clauseBlock.statementConnection_);
|
||||
break;
|
||||
case 'controls_if_else':
|
||||
this.elseCount_++;
|
||||
elseStatementConnection = clauseBlock.statementConnection_;
|
||||
break;
|
||||
default:
|
||||
throw Error('Unknown block type: ' + clauseBlock.type);
|
||||
case 'controls_if_elseif':
|
||||
this.elseifCount_++;
|
||||
valueConnections.push(clauseBlock.valueConnection_);
|
||||
statementConnections.push(clauseBlock.statementConnection_);
|
||||
break;
|
||||
case 'controls_if_else':
|
||||
this.elseCount_++;
|
||||
elseStatementConnection = clauseBlock.statementConnection_;
|
||||
break;
|
||||
default:
|
||||
throw Error('Unknown block type: ' + clauseBlock.type);
|
||||
}
|
||||
clauseBlock = clauseBlock.nextConnection &&
|
||||
clauseBlock.nextConnection.targetBlock();
|
||||
@@ -239,22 +239,22 @@ export const controls_if = {
|
||||
var i = 1;
|
||||
while (clauseBlock) {
|
||||
switch (clauseBlock.type) {
|
||||
case 'controls_if_elseif':
|
||||
var inputIf = this.getInput('IF' + i);
|
||||
var inputDo = this.getInput('DO' + i);
|
||||
clauseBlock.valueConnection_ =
|
||||
case 'controls_if_elseif':
|
||||
var inputIf = this.getInput('IF' + i);
|
||||
var inputDo = this.getInput('DO' + i);
|
||||
clauseBlock.valueConnection_ =
|
||||
inputIf && inputIf.connection.targetConnection;
|
||||
clauseBlock.statementConnection_ =
|
||||
clauseBlock.statementConnection_ =
|
||||
inputDo && inputDo.connection.targetConnection;
|
||||
i++;
|
||||
break;
|
||||
case 'controls_if_else':
|
||||
var inputDo = this.getInput('ELSE');
|
||||
clauseBlock.statementConnection_ =
|
||||
i++;
|
||||
break;
|
||||
case 'controls_if_else':
|
||||
var inputDo = this.getInput('ELSE');
|
||||
clauseBlock.statementConnection_ =
|
||||
inputDo && inputDo.connection.targetConnection;
|
||||
break;
|
||||
default:
|
||||
throw 'Unknown block type.';
|
||||
break;
|
||||
default:
|
||||
throw 'Unknown block type.';
|
||||
}
|
||||
clauseBlock = clauseBlock.nextConnection &&
|
||||
clauseBlock.nextConnection.targetBlock();
|
||||
@@ -544,17 +544,17 @@ export const controls_try_finally = {
|
||||
var elseStatementConnection = null;
|
||||
while (clauseBlock) {
|
||||
switch (clauseBlock.type) {
|
||||
case 'controls_except':
|
||||
this.elseifCount_++;
|
||||
valueConnections.push(clauseBlock.valueConnection_);
|
||||
statementConnections.push(clauseBlock.statementConnection_);
|
||||
break;
|
||||
case 'controls_finally':
|
||||
this.elseCount_++;
|
||||
elseStatementConnection = clauseBlock.statementConnection_;
|
||||
break;
|
||||
default:
|
||||
throw Error('Unknown block type: ' + clauseBlock.type);
|
||||
case 'controls_except':
|
||||
this.elseifCount_++;
|
||||
valueConnections.push(clauseBlock.valueConnection_);
|
||||
statementConnections.push(clauseBlock.statementConnection_);
|
||||
break;
|
||||
case 'controls_finally':
|
||||
this.elseCount_++;
|
||||
elseStatementConnection = clauseBlock.statementConnection_;
|
||||
break;
|
||||
default:
|
||||
throw Error('Unknown block type: ' + clauseBlock.type);
|
||||
}
|
||||
clauseBlock = clauseBlock.nextConnection &&
|
||||
clauseBlock.nextConnection.targetBlock();
|
||||
@@ -575,22 +575,22 @@ export const controls_try_finally = {
|
||||
var i = 1;
|
||||
while (clauseBlock) {
|
||||
switch (clauseBlock.type) {
|
||||
case 'controls_except':
|
||||
var inputIf = this.getInput('IF' + i);
|
||||
var inputDo = this.getInput('DO' + i);
|
||||
clauseBlock.valueConnection_ =
|
||||
case 'controls_except':
|
||||
var inputIf = this.getInput('IF' + i);
|
||||
var inputDo = this.getInput('DO' + i);
|
||||
clauseBlock.valueConnection_ =
|
||||
inputIf && inputIf.connection.targetConnection;
|
||||
clauseBlock.statementConnection_ =
|
||||
clauseBlock.statementConnection_ =
|
||||
inputDo && inputDo.connection.targetConnection;
|
||||
i++;
|
||||
break;
|
||||
case 'controls_finally':
|
||||
var inputDo = this.getInput('ELSE');
|
||||
clauseBlock.statementConnection_ =
|
||||
i++;
|
||||
break;
|
||||
case 'controls_finally':
|
||||
var inputDo = this.getInput('ELSE');
|
||||
clauseBlock.statementConnection_ =
|
||||
inputDo && inputDo.connection.targetConnection;
|
||||
break;
|
||||
default:
|
||||
throw 'Unknown block type.';
|
||||
break;
|
||||
default:
|
||||
throw 'Unknown block type.';
|
||||
}
|
||||
clauseBlock = clauseBlock.nextConnection &&
|
||||
clauseBlock.nextConnection.targetBlock();
|
||||
@@ -794,15 +794,17 @@ export const controls_for_range = {
|
||||
};
|
||||
|
||||
|
||||
controls_whileUntil.OPERATORS =
|
||||
[[Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE, 'WHILE'],
|
||||
[Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL, 'UNTIL']];
|
||||
controls_whileUntil.OPERATORS = [
|
||||
[Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE, 'WHILE'],
|
||||
[Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL, 'UNTIL']
|
||||
];
|
||||
|
||||
|
||||
|
||||
controls_flow_statements.OPERATORS =
|
||||
[[Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK, 'BREAK'],
|
||||
[Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE, 'CONTINUE']];
|
||||
controls_flow_statements.OPERATORS = [
|
||||
[Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK, 'BREAK'],
|
||||
[Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE, 'CONTINUE']
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -1022,7 +1024,7 @@ export const get_unique_identifier = {
|
||||
init: function () {
|
||||
this.setColour(LOOPS_HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_DEVICE +'ID');
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_DEVICE + 'ID');
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true);
|
||||
this.setTooltip(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN + Blockly.Msg.MIXLY_GET_UNIQUE_IDEN);
|
||||
|
||||
@@ -442,12 +442,12 @@ export const dicts_add_change_del = {
|
||||
var e = b.getFieldValue("WHERE"),
|
||||
d = "";
|
||||
switch (e) {
|
||||
case "INSERT":
|
||||
d = Blockly.Msg.DICTS_ADD_TOOLTIP;
|
||||
break;
|
||||
case "DELETE":
|
||||
d = Blockly.Msg.DICTS_DELETE_TOOLTIP;
|
||||
break;
|
||||
case "INSERT":
|
||||
d = Blockly.Msg.DICTS_ADD_TOOLTIP;
|
||||
break;
|
||||
case "DELETE":
|
||||
d = Blockly.Msg.DICTS_DELETE_TOOLTIP;
|
||||
break;
|
||||
}
|
||||
//if ("FROM_START" == e || "FROM_END" == e) d += " " + Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1", ONE_BASED_INDEXING ? "#1": "#0");
|
||||
return d
|
||||
|
||||
@@ -194,20 +194,20 @@ export const text_char_at2 = {
|
||||
e = b.getFieldValue("WHERE"),
|
||||
d = "";
|
||||
switch (a + " " + e) {
|
||||
case "GET FROM_START":
|
||||
case "GET FROM_END":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;
|
||||
break;
|
||||
case "GET RANDOM":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;
|
||||
break;
|
||||
case "GET_REMOVE FROM_START":
|
||||
case "GET_REMOVE FROM_END":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;
|
||||
break;
|
||||
case "GET_REMOVE RANDOM":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;
|
||||
break;
|
||||
case "GET FROM_START":
|
||||
case "GET FROM_END":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;
|
||||
break;
|
||||
case "GET RANDOM":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;
|
||||
break;
|
||||
case "GET_REMOVE FROM_START":
|
||||
case "GET_REMOVE FROM_END":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;
|
||||
break;
|
||||
case "GET_REMOVE RANDOM":
|
||||
d = Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;
|
||||
break;
|
||||
}
|
||||
if ("FROM_START" == e || "FROM_END" == e) d += " " + Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1", Blockly.Msg.ONE_BASED_INDEXING ? "#1" : "#0");
|
||||
return d
|
||||
@@ -296,14 +296,16 @@ export const text_substring2 = {
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function () {
|
||||
this['WHERE_OPTIONS_1'] =
|
||||
[[Blockly.Msg.LISTS_GET_INDEX_FROM_START, 'FROM_START'],
|
||||
[Blockly.Msg.LISTS_GET_INDEX_FROM_END, 'FROM_END'],
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST, 'FIRST']];
|
||||
this['WHERE_OPTIONS_2'] =
|
||||
[[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START, 'FROM_START'],
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END, 'FROM_END'],
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_END_LAST, 'LAST']];
|
||||
this['WHERE_OPTIONS_1'] = [
|
||||
[Blockly.Msg.LISTS_GET_INDEX_FROM_START, 'FROM_START'],
|
||||
[Blockly.Msg.LISTS_GET_INDEX_FROM_END, 'FROM_END'],
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST, 'FIRST']
|
||||
];
|
||||
this['WHERE_OPTIONS_2'] = [
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START, 'FROM_START'],
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END, 'FROM_END'],
|
||||
[Blockly.Msg.LISTS_GET_SUBLIST_END_LAST, 'LAST']
|
||||
];
|
||||
this.setHelpUrl(Blockly.Msg.LISTS_GET_SUBLIST_HELPURL);
|
||||
this.setColour(TEXTS_HUE);
|
||||
this.appendValueInput("VAR")
|
||||
@@ -423,10 +425,11 @@ export const text_substring = {
|
||||
|
||||
export const text_equals_starts_ends = {
|
||||
init: function () {
|
||||
var TEXT_DOWHAT =
|
||||
[[Blockly.Msg.MIXLY_EQUALS, '==='],
|
||||
[Blockly.Msg.MIXLY_STARTSWITH, 'startswith'],
|
||||
[Blockly.Msg.MIXLY_ENDSWITH, 'endswith']];
|
||||
var TEXT_DOWHAT = [
|
||||
[Blockly.Msg.MIXLY_EQUALS, '==='],
|
||||
[Blockly.Msg.MIXLY_STARTSWITH, 'startswith'],
|
||||
[Blockly.Msg.MIXLY_ENDSWITH, 'endswith']
|
||||
];
|
||||
this.setColour(TEXTS_HUE);
|
||||
this.appendValueInput("STR1")
|
||||
.setCheck(String);
|
||||
@@ -454,9 +457,13 @@ export const text_compare_to = {
|
||||
|
||||
export const text_capital = {
|
||||
init: function () {
|
||||
var TEXT_CAPITAL =
|
||||
[[Blockly.Msg.TEXT_UPPER, 'upper'], [Blockly.Msg.TEXT_TITLE, 'title'], [Blockly.Msg.TEXT_CAPITALIZE, 'capitalize'], [Blockly.Msg.TEXT_SWAPCASE, 'swapcase'],
|
||||
[Blockly.Msg.TEXT_LOWER, 'lower']];
|
||||
var TEXT_CAPITAL = [
|
||||
[Blockly.Msg.TEXT_UPPER, 'upper'],
|
||||
[Blockly.Msg.TEXT_TITLE, 'title'],
|
||||
[Blockly.Msg.TEXT_CAPITALIZE, 'capitalize'],
|
||||
[Blockly.Msg.TEXT_SWAPCASE, 'swapcase'],
|
||||
[Blockly.Msg.TEXT_LOWER, 'lower']
|
||||
];
|
||||
this.setColour(TEXTS_HUE);
|
||||
this.appendValueInput("VAR")
|
||||
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_GET)
|
||||
@@ -480,10 +487,11 @@ export const text_capital = {
|
||||
|
||||
export const text_center = {
|
||||
init: function () {
|
||||
var TEXT_CENTER =
|
||||
[[Blockly.Msg.TEXT_LJUST, 'ljust'],
|
||||
[Blockly.Msg.TEXT_CENTER, 'center'],
|
||||
[Blockly.Msg.TEXT_RJUST, 'rjust']];
|
||||
var TEXT_CENTER = [
|
||||
[Blockly.Msg.TEXT_LJUST, 'ljust'],
|
||||
[Blockly.Msg.TEXT_CENTER, 'center'],
|
||||
[Blockly.Msg.TEXT_RJUST, 'rjust']
|
||||
];
|
||||
this.setColour(TEXTS_HUE);
|
||||
this.appendValueInput("VAR")
|
||||
.appendField(new Blockly.FieldDropdown(TEXT_CENTER), 'CENTER')
|
||||
|
||||
Reference in New Issue
Block a user