Skip to content

Commit cb8d934

Browse files
authored
Merge pull request #338 from smalruby/294-mbit-more-v2
Microbit More V2
2 parents dd90002 + 93c0b7a commit cb8d934

26 files changed

+16731
-580
lines changed

.circleci/config.yml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
path: dist
168168
integration:
169169
<<: *defaults
170-
parallelism: 1
170+
parallelism: 2
171171
environment:
172172
JEST_JUNIT_OUTPUT_NAME: results.txt
173173
steps:
@@ -201,6 +201,19 @@ jobs:
201201
- run: npm run deploy -- -x -r https://${GH_TOKEN}@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git
202202
- run: npm run deploy:smalruby.app -- -x -r https://${GH_TOKEN}@github.com/$CIRCLE_PROJECT_USERNAME/smalruby.app.git
203203

204+
deploy-gh-pages-branch:
205+
<<: *defaults
206+
steps:
207+
- *restore_git_cache
208+
- checkout
209+
- *restore_npm_cache
210+
- *restore_build_cache
211+
- run: |
212+
git config --global user.email $(git log --pretty=format:"%ae" -n1)
213+
git config --global user.name $(git log --pretty=format:"%an" -n1)
214+
- run: npm run deploy -- -x -r https://${GH_TOKEN}@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git -e $CIRCLE_BRANCH
215+
- run: npm run deploy:smalruby.app -- -x -r https://${GH_TOKEN}@github.com/$CIRCLE_PROJECT_USERNAME/smalruby.app.git -e $CIRCLE_BRANCH
216+
204217
workflows:
205218
version: 2
206219
commitlint:
@@ -236,7 +249,6 @@ workflows:
236249
only:
237250
- master
238251
- develop
239-
- beta
240252
- /^hotfix\/.*/
241253
- lint:
242254
context:
@@ -268,7 +280,6 @@ workflows:
268280
only:
269281
- master
270282
- develop
271-
- beta
272283
- /^hotfix\/.*/
273284
- store_dist:
274285
context:
@@ -280,7 +291,6 @@ workflows:
280291
only:
281292
- master
282293
- develop
283-
- beta
284294
- /^hotfix\/.*/
285295
- deploy-gh-pages:
286296
context:
@@ -290,6 +300,53 @@ workflows:
290300
- unit
291301
- integration
292302
- build
303+
filters:
304+
branches:
305+
ignore:
306+
- beta
307+
- /^dependabot/.*/
308+
- /^renovate/.*/
309+
- /^pull/.*/ # don't deploy to gh pages on PRs.
310+
build-deploy-beta:
311+
jobs:
312+
- setup:
313+
context:
314+
- dockerhub-credentials
315+
filters:
316+
branches:
317+
only:
318+
- beta
319+
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
320+
- build:
321+
context:
322+
- dockerhub-credentials
323+
requires:
324+
- setup
325+
- store_build:
326+
context:
327+
- dockerhub-credentials
328+
requires:
329+
- build
330+
filters:
331+
branches:
332+
only:
333+
- beta
334+
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
335+
- store_dist:
336+
context:
337+
- dockerhub-credentials
338+
requires:
339+
- build
340+
filters:
341+
branches:
342+
only:
343+
- beta
344+
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
345+
- deploy-gh-pages-branch:
346+
context:
347+
- dockerhub-credentials
348+
requires:
349+
- build
293350
filters:
294351
branches:
295352
ignore:

LEGAL

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@ opal/opal-parser.min.js
5454
These files are licensed under the MIT License
5555
(see https://github.com/opal/opal/blob/master/LICENSE ).
5656

57-
src/lib/libraries/extensions/microbit_more/microbitMore.png
58-
src/lib/libraries/extensions/microbit_more/microbitMore-illustration.svg
59-
src/lib/libraries/extensions/microbit_more/microbitMore-small.svg
57+
src/lib/libraries/extensions/microbitMore/connection-icon.svg
58+
src/lib/libraries/extensions/microbitMore/connection-small-icon.svg
59+
src/lib/libraries/extensions/microbitMore/entry-icon.png
60+
src/lib/libraries/extensions/microbitMore/index.jsx
61+
src/lib/libraries/extensions/microbitMore/inset-icon.svg
62+
src/lib/libraries/extensions/microbitMore/mbit-more-v2-board.afdesign
63+
src/lib/libraries/extensions/microbitMore/mbit-more-v2-entry-icon.afdesign
64+
src/lib/libraries/extensions/microbitMore/translations.json
6065

6166
These files are licensed under the MIT License
62-
(see https://github.com/yokobond/scratch-microbit-more/blob/master/LICENSE ).
63-
67+
(see https://github.com/microbit-more/mbit-more-v2/blob/master/LICENSE ).

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smalruby3-gui",
3-
"version": "1.0.2",
3+
"version": "2.0.0",
44
"description": "GraphicaL User Interface for creating and running Smalruby 3.0 projects",
55
"author": "Ruby Programming Shounendan",
66
"license": "BSD-3-Clause",

src/containers/extension-library.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ const messages = defineMessages({
2525
class ExtensionLibrary extends React.PureComponent {
2626
constructor (props) {
2727
super(props);
28+
extensionLibraryContent.forEach(extension => {
29+
if (extension.setFormatMessage) {
30+
extension.setFormatMessage(this.props.intl.formatMessage);
31+
}
32+
if (extension.translationMap) {
33+
Object.assign(
34+
this.props.intl.messages,
35+
extension.translationMap[this.props.intl.locale]
36+
);
37+
}
38+
});
2839
bindAll(this, [
2940
'handleItemSelect'
3041
]);

src/lib/generator.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,9 @@ class Generator {
582582
return this.getField(block, name).id;
583583
}
584584

585-
getFieldValue (block, name) {
586-
return this.getField(block, name).value;
585+
getFieldValue (block, name, defaultValue = null) {
586+
const field = this.getField(block, name);
587+
return field ? field.value : defaultValue;
587588
}
588589

589590
isConnectedValue (block) {

src/lib/libraries/extensions/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ const extensions = [
400400
];
401401

402402
// Injected for extra extensions
403-
import microbitMore from './microbitMore/entry.jsx';
403+
import microbitMore from './microbitMore/index.jsx';
404404
extensions.push(microbitMore);
405405

406406
export default extensions;

0 commit comments

Comments
 (0)