Skip to content

smalruby/smalruby3-editor

 
 

Repository files navigation

smalruby3-editor: The Smalruby 3 Editor Monorepo

This is the development repository for Smalruby 3, a Ruby-based visual programming environment forked from Scratch 3.0.

If you'd like to use Scratch, please visit the Scratch website. You can build your own Scratch project by pressing "Create" on that website or by visiting https://scratch.mit.edu/projects/editor/.

This is a source code repository for the packages that make up the Smalruby editor and a few additional support packages. Use this if you'd like to learn about how the Smalruby editor works or to contribute to its development.

What's in this repository?

The packages directory in this repository contains:

  • scratch-gui: Smalruby 3 GUI. The React-based web interface, customized for Smalruby (e.g., Ruby mode, custom extensions). Forked from scratch-gui.
  • scratch-vm: Smalruby 3 VM. The virtual machine that runs projects, with Opal integration for Ruby execution. Forked from scratch-vm.
  • scratch-render draws backdrops, sprites, and clones on the stage.
  • scratch-svg-renderer processes SVG (vector) images for use with projects.

Please add to this list as more packages are migrated to the monorepo.

Each package has its own README.md file with more information about that package.

Development

Installation

To install dependencies for all packages in the monorepo:

npm install

Note: We strictly recommend using the Docker environment for development to ensure consistency. Please refer to the root README for Docker instructions.

Build

To build all packages:

npm run build

To build in development mode (faster, with source maps):

npm run build:dev

Running the Development Server

To start the GUI development server (typically on http://localhost:8601):

npm start

Testing

To run all tests (lint, unit, integration):

npm test

To run unit tests only:

npm run test:unit

To run integration tests only:

npm run test:integration

Smalruby Specific Features

Ruby Mode

Smalruby 3 integrates Opal to convert Ruby code into JavaScript that runs within the Scratch VM. The scratch-vm package handles this execution logic, while scratch-gui provides the Ruby code editor (using Ace Editor) and UI toggles.

Google Drive Integration

Smalruby 3 supports loading and saving projects directly to Google Drive. For setup instructions, please see Google Drive Setup Guide.

Monorepo migration

What's going on?

We're migrating the Smalruby editor packages into this monorepo, following the upstream Scratch Editor structure. This allows us to manage all packages in one place.

Why are there only a few packages in this repo?

We're migrating packages in stages.

Thank you!

Smalruby is based on Scratch from the Scratch Foundation. Scratch would not be what it is today without help from the global community of Scratchers and open-source contributors. Thank you for your contributions and support. Scratch on!

Donate

We provide Scratch free of charge, and want to keep it that way! Please consider making a donation to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!

About

Smalruby3 editor mono-repo

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.1%
  • CSS 1.8%
  • TypeScript 0.9%
  • HTML 0.7%
  • Shell 0.4%
  • GLSL 0.1%