Blocklike.js Educational Library – So kids can level up from Scratch
source link: https://github.com/ronilan/BlockLike
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
BlockLike.js
BlockLike.js is an educational JavaScript library. It bridges the gap between block-based and text-based programming.
BlockLike.js is designed following Scratch concepts, methods and patterns. The screen is a centered stage. Interaction is with Sprites. Code is executed in a "paced" manner. Scratch block code and BlockLike.js text code are meant to be as literally similar as possible.
BlockLike.js is written in ES6/ES7 flavored JavaScript. It is environment independent. It can be used anywhere modern JavaScript runs.
See BlockLike.org for details, docs , examples and FAQ .
Get Started
The easiest way to start with BlockLike.js is using CodePen.IO. Alternatively, you can create an index.html file and include BlockLike.js with the script tag.
The website has a one-click setup for CodePen and instructions how to load the most recent version off of a CDN.
Development
Install
Make sure to have Node.js installed.
Clone the repo.
In a terminal:
npm install npm start npm run watch
Troubleshoot
If you encounter:
Failed at the [email protected] install script 'node-gyp rebuild'.
You'll need Cairo and Pango installed on your dev box. BlockLike uses node-canvas to run tests (dev dependency) and it requires the former.
Mac
brew install pkg-config cairo pango libpng jpeg giflib npm install
Other systems
See node-canvas documentation .
If you encounter:
listen EADDRINUSE 127.0.0.1:9000
Something else is using that port.
Open webpack.config.js and change the port setting for the devServer.
Build
npm run build
The build script will build the two library versions (normal and min), generate the third one (mascotless) and republish the docs.
Test
All:
npm run test
Single test:
TEST=stage_looks npm run test:it
Documentation publishing
npm run docs
Authors
License
Fabriqué au Canada : Made in Canada
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK