blockly
TypeScript icon, indicating that this package has built-in type declarations

3.20200924.3 • Public • Published

Blockly

Google's Blockly is a web-based, visual programming editor. Users can drag blocks together to build programs. All code is free and open source.

The source for this module is in the Blockly repo.

Installation

You can install this package either via npm or unpkg.

npm

npm install blockly

unpkg

<script src="https://unpkg.com/blockly/blockly.min.js"></script>

Example Usage

import Blockly from 'blockly';
Blockly.inject('blocklyDiv', {
    ...
})

Samples

For samples on how to integrate Blockly into your project, view the list of samples at blockly-samples.

Importing Blockly

When you import Blockly with import * as Blockly from 'blockly'; you'll get the default modules: Blockly core, Blockly built-in blocks, the JavaScript generator and the English lang files.

If you need more flexibility, you'll want to define your imports more carefully:

Blockly Core

import * as Blockly from 'blockly/core';

Blockly built in blocks

import 'blockly/blocks';

Blockly Generators

If your application needs to generate code from the Blockly blocks, you'll want to include a generator.

import 'blockly/python';

to include the Python generator, you can also import blockly/javascript, blockly/php, blockly/dart and blockly/lua.

Blockly Languages

import * as Fr from 'blockly/msg/fr';
Blockly.setLocale(Fr);

To import the French lang files. Once you've imported the specific lang module, you'll also want to set the locale in Blockly.

For a full list of supported Blockly locales, see: https://github.com/google/blockly/tree/master/msg/js

License

Apache 2.0

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
12.1.01,009latest
12.1.0-beta.0129beta

Version History

VersionDownloads (Last 7 Days)Published
12.1.01,009
12.1.0-beta.0129
12.0.1-beta.1451
12.0.01,872
12.0.0-beta.75
12.0.0-beta.62
12.0.0-beta.52
12.0.0-beta.4299
12.0.0-beta.32
12.0.0-beta.20
11.2.24,459
11.2.12,350
12.0.0-beta.1175
11.2.037
12.0.0-beta.02
11.2.0-beta.20
11.2.0-beta.11
11.2.0-beta.00
11.1.114,043
11.1.071
11.0.073
11.0.0-beta.121
11.0.0-beta.111
11.0.0-beta.101
11.0.0-beta.91
11.0.0-beta.81
11.0.0-beta.71
11.0.0-beta.61
11.0.0-beta.51
11.0.0-beta.41
10.4.37,870
10.5.0-beta.00
10.4.2166
10.4.155
10.4.016
10.4.0-beta.10
10.4.0-beta.00
11.0.0-beta.30
11.0.0-beta.20
10.3.1308
10.3.1-beta.10
10.3.1-beta.00
11.0.0-beta.10
11.0.0-beta.00
10.3.0221
10.3.0-beta.00
10.2.2242
10.2.16
10.2.023
10.2.0-beta.30
10.2.0-beta.20
10.1.381
10.2.0-beta.10
10.2.0-beta.00
10.1.2367
10.1.18
10.1.010
10.0.2199
10.0.110
10.0.0342
10.0.0-beta.00
9.3.3414
9.3.222
9.3.132
9.3.07
9.3.0-beta.00
9.2.1417
9.2.063
9.1.130
9.1.011
9.1.0-beta.00
9.0.19
9.0.021
9.0.0-beta.40
9.0.0-beta.30
9.0.0-beta.20
9.0.0-beta.10
9.0.0-beta.00
8.0.5-beta.00
8.0.5707
8.0.46
8.0.4-beta.10
8.0.4-beta.00
8.0.318
8.0.3-beta.10
8.0.3-beta.00
8.0.243
7.20211209.5142
8.0.123
8.0.1-beta.00
8.0.090
8.20220331.0-beta.10
8.20220331.0-beta.00
7.20211209.42
7.20211209.34
7.20211209.211
7.20211209.11
7.20211209.09
7.20211209.0-beta.40
7.20211209.0-beta.30
7.20211209.0-beta.20
7.20211209.0-beta.10
7.20211209.0-beta.01
7.20210930.0-beta.40
7.20210930.0-beta.30
7.20210930.0-beta.20
7.20210930.0-beta.10
7.20210930.0-beta.00
6.20210701.0613
5.20210624.0-beta.50
5.20210624.0-beta.40
5.20210624.0-beta.30
5.20210624.0-beta.20
5.20210624.0-beta.10
5.20210325.1164
5.20210624.0-beta.01
5.20210325.012
4.20210325.0-beta.70
4.20210325.0-beta.60
4.20210325.0-beta.50
4.20210325.0-beta.40
4.20210325.0-beta.30
4.20210325.0-beta.20
4.20210325.0-beta.10
3.20200325.0-beta.00
4.20210325.0-beta.00
4.20201217.029
3.20201217.0-beta.40
3.20201217.0-beta.30
3.20201217.0-beta.20
3.20201217.0-beta.10
3.20201217.0-beta.00
3.20200924.4372
3.20200924.313
3.20200924.20
3.20200924.168
3.20200924.05
3.20200625.2417
3.20200625.110
3.20200625.00
3.20200402.139
3.20200402.00
3.20200123.116
3.20200123.041
3.20191014.43
3.20191014.30
3.20191014.20
3.20191014.10
2.20190722.10

Package Sidebar

Install

npm i blockly@3.20200924.3

Version

3.20200924.3

License

Apache-2.0

Unpacked Size

10 MB

Total Files

481

Last publish

Collaborators

  • google-wombot
  • samelhusseini