blockly README

The project's README from github.com/RaspberryPiFoundation/blockly. As one markdown file: README.md.

Blockly

Blockly is a library that adds a visual code editor to web apps. The Blockly editor uses interlocking, graphical blocks to represent code concepts like variables, logical expressions, loops, and more. It allows users to apply programming principles without having to worry about syntax or the intimidation of a blinking cursor on the command line. All code is free and open source.

An example program built with Blockly that checks for a game over state

Getting Started with Blockly

Blockly has many resources for learning how to use the library. You can try a live demo or visit our developer site to read the documentation on how to get started, configure Blockly, and integrate it into your application. The developer site also contains links to:

Installing Blockly

If you're starting a new project using Blockly, you can bootstrap it using our create-package tool:

npx @blockly/create-package app my-cool-blockly-app --typescript

Or, if you're adding Blockly to an existing project, just install it with npm:

npm install blockly

Getting Help

blockly-samples

We have a number of examples which demonstrate various techniques to include and extend the Blockly library. These examples can be found in another repository called blockly-samples.

Plugins

A plugin is a self-contained piece of code that adds functionality to Blockly. Plugins can add fields, define themes, create renderers, and much more. For more information, see the Plugins documentation.

Contributing to Blockly

Want to make Blockly better? We welcome contributions to Blockly in the form of pull requests, bug reports, documentation, answers on the forum, and more! Check out our Contributing Guidelines for more information. You might also want to look for issues tagged "Help Wanted" which are issues we think would be great for external contributors to help with.

Releases

We release new versions on npm and GitHub releases, and then update our docs and demo pages. If there are breaking regressions, such as a crash when performing a standard action or a rendering issue that makes Blockly unusable, we will cherry-pick fixes into patch releases. The releases page has a list of all releases.

We use semantic versioning. Releases that have breaking changes or are otherwise not backwards compatible will have a new major version. Patch versions are reserved for bug-fix patches between scheduled releases.

We now have a beta release on npm. If you'd like to test the upcoming release, or try out a not-yet-released new API, you can use the beta channel with:

npm install blockly@beta

As it is a beta channel, it may be less stable, and the APIs there are subject to change.

Branches

Most development happens in the main branch. Pull requests should typically be made against main. This branch should be stable; features that aren't ready yet should be merged to a feature branch instead. Once something is in main we expect it to be part of the next release. However, features and APIs here are subject to change until they are released. If you're working on a production application using Blockly, you should use the release from npm or the GitHub release page, not the main branch.

Larger changes may have their own branches until they are good enough for people to try out. These will be developed separately until we think they are almost ready for release. They will be merged into main when ready.

New APIs

Once a new API is released, it is considered beta until the following release. We generally try to avoid changing an API after it has been released, but sometimes we need to make changes after seeing how an API is used. If an API has been around for at least two releases we'll do our best to avoid breaking it.

Unreleased APIs may change radically. Anything that is in main but not released is subject to change without warning.

Issues and Milestones

We typically triage all bugs within 1 week, which includes adding any appropriate labels and assigning it to a milestone. Please keep in mind, we are a small team so even feature requests that everyone agrees on may not be prioritized.

Accessibility

Although Blockly is built around drag-and-drop, it is fully usable with the keyboard alone. Blockly is also accessible to screenreader users by default. We provide Accessibility Conformance Reports in the VPAT format that outline Blockly's conformance to WCAG 2.2 Level AA.

blockly (RaspberryPiFoundation/blockly)

Searching Database…

13.6K ·GitHub
Что это такое?Blockly — это библиотека, которая добавляет в веб-приложения визуальный редактор кода с перетаскиванием. Вместо обычного синтаксиса в нём используются сцепляющиеся графические блоки, которые представляют переменные, логические выражения, циклы и другие понятия программирования.
Это самостоятельное приложение или библиотека, которую я встраиваю в свой сайт?Это библиотека, которую вы встраиваете в своё веб-приложение; сама по себе она не является готовым приложением. Вы устанавливаете её и интегрируете редактор в интерфейс своего проекта.
Как добавить Blockly в проект?Для нового проекта создайте его с помощью инструмента create-package, а для существующего — установите библиотеку через npm.
Нужны ли мне Node и npm для работы с этим?Да, Blockly распространяется и устанавливается через npm, а скрипты монорепозитория запускаются через npx/nx, поэтому предполагается наличие Node.js и npm.
Стабилен ли API или что-то может сломаться между версиями?Код в основной ветке и не выпущенные API могут кардинально меняться без предупреждения; даже выпущенные API считаются стабильными только после того, как пройдут два релиза, а критические изменения повышают мажорную версию.
Для кого это предназначено?Для разработчиков, которые создают обучающие или простые в освоении инструменты для программирования и хотят, чтобы пользователи писали программы с помощью блоков, а не набирали синтаксис, не пугаясь пустой командной строки.
Доступен ли Blockly пользователям, которые не могут работать с перетаскиванием?Да, несмотря на то что Blockly построен на перетаскивании, его можно полностью использовать только с клавиатуры, а по умолчанию он доступен для пользователей программ чтения с экрана. Также публикуются отчёты о соответствии требованиям доступности в формате VPAT относительно WCAG 2.2, уровень AA.
Можно ли расширить Blockly собственной функциональностью?Да, через плагины — самостоятельные фрагменты кода, которые могут добавлять поля, задавать темы оформления, создавать собственные рендереры и многое другое. Кроме того, есть отдельный репозиторий blockly-samples с примерами интеграций.
Можно ли попробовать Blockly перед интеграцией?Да, на сайте для разработчиков есть живая демонстрация, а также вводные статьи и практические уроки (codelabs), чтобы изучить библиотеку до установки.
Можно ли опробовать ещё не вышедшие функции заранее?Да, в npm опубликован бета-канал для тестирования предстоящих релизов и ещё не выпущенных API, однако он может быть менее стабильным.
What are similar projects?rete, dnd-kit, chakra-ui, plate, handsontable, tambo, MathJax, lexical
Size
185.2 MB
Stars
13.6K
Age
12y
Commits · 90 Days