Giter VIP home page Giter VIP logo

blockly-samples's Introduction

blockly-samples Built on Blockly

Sample projects showing how to integrate Blockly into your project.

Running the samples

In order to run each of the samples, cd into each sample directoy and run:

npm install

You can then run npm run start to start a web server.

All samples are configured to use port 3000
so open http://localhost:3000 to view each sample in the browser.

Support

Blockly has an active developer forum. Please drop by and say hello. Show us your prototypes early; collectively we have a lot of experience and can offer hints which will save you time. We actively monitor the forums and typically respond to questions within 2 working days.

Get Blockly

You can install the blockly package on npm.

npm install blockly

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

blockly-samples's People

Contributors

samelhusseini avatar rachel-fenichel avatar navilperez avatar abbychau avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.