Giter VIP home page Giter VIP logo

scratch3-extension-template.old's Introduction

Scratch3.0 Extension Template

This aims for a comprehensive template to develop a Scratch 3.0 extension easily.

  • scratch-gui and scratch-vm have been integrated with git subtree and everything is managed with Rush
  • Live reloading is supported
  • Testing (TBD)
  • Built files can be deployed to GitHub Pages

Background

Developing your own extension for Scratch 3.0 is a little tricky since your extension requires scratch-gui and scratch-vm to be executed and integrating with them is not easy. You can clone scratch-gui and scratch-vm manually and integrate your extension into them by using yarn link. But yarn link could be a headache sometimes since it configures linkages between packages globally which means that you can have each package at only a particular directory. If you would like to move a package to another directory or use a package at different directory, then you need to execute yarn unlink first to remove a global linkage which could be forgotten and not easy to manage everything.

So, this is developed as a out-of-the-box template which already integrate scratch-gui and scratch-vm with git subtree and can manage them with Rush. Rush is a quite useful monorepo manager but can be used for sub trees as packages. It manages linkages between packages locally unlike yarn link and builds all packages in the right order according to dependencies like your extension, scratch-vm and scratch-gui.

Also, thanks to Rush running task for all packages simultaneously, live reloading works for all packages by running just a single Rush task. When you change and save the source code of your extension, your extension and scratch-gui will be automatically built and browser will automatically reload scratch-gui with the latest extension.

Prerequisites

Quick Start

Get this source code and install dependencies.

git clone https://github.com/eqot/scratch3-extension-template
cd scratch3-extension-template
rush update

Start a development server and watch update.

rush start

Build files.

rush build

Deploy built files to GitHub Pages.

rush deploy

scratch3-extension-template.old's People

Contributors

eqot 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.