• Stars
    star
    154
  • Rank 242,095 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The HTMLifier "converts" Scratch 3.0 projects to an HTML file by putting all the project data and the entire Scratch engine into one enormous file

htmlifier

The HTMLifier "converts" Scratch 3.0 projects to an HTML file by putting all the project data and the entire Scratch engine into one enormous file.

It does this by making Scratch VM fetch a project, and in doing so, it tracks the assets it fetches from the project.json. It converts the fetched assets and project.json into a base64 data URI. It also fetches the code for the Scratch VM. It inserts all this in a template HTML file, which has been set up to load the project from the base64 data URIs and do other things that the Scratch VM doesn't take of, which is normally handled by scratch-gui, such as variable/list monitors and ask and wait prompts.

The HTMLifier is also available as an npm package.

Credits

CSS by Mr. Cringe Kid.

The Scratch engine is from scratch-vm.

JSZip for downloading as a zip.

See also

The Scratch mod used by the HTMLifier: E็พŠicques (Github).

Depending on your use case, the HTMLifier may not be the best option for you. The HTMLifier prioritizes accuracy by using almost the same engine that vanilla Scratch uses, sacrificing speed and editability.

Scratch to JavaScript compilers (best for speed): Phosphorus (Scratch 2.0), Forkphorus (3.0), and TurboWarp (3.0).

Scratch to JavaScript converter (best for learning JavaScript): Leopard

Development

If modifying the files in src/, you'll have to re-bundle everything.

# Build once
deno run --allow-run --allow-read=src --allow-write=index.bundle.min.js \
  --allow-net=sheeptester.github.io bin/build.ts

# Automatically build when the files change (for development)
nodemon --exec "deno run --allow-all" --watch src --watch client \
  --ext ts,css,html,js bin/build.ts -- dev

# Build for Node
deno run --allow-run --allow-read=src --allow-write=node/index.min.js \
  --allow-net=sheeptester.github.io bin/build.ts node

More Repositories

1

sheeptester.github.io

What you see when you go to this site ->
HTML
56
star
2

primitive-cloud-server

A primitive Node server for Scratch 3.0 cloud variables; it's not made for large-scale projects and can easily be tricked by those pesky JavaScript programmers
JavaScript
31
star
3

words-go-here

Now a miscellaneous repository that houses various projects
HTML
24
star
4

platformre

Platformre script >uo
JavaScript
9
star
5

uxdy

like elon's X๐Ÿ˜, this aspires to be an โœจeverything appโœจ for ucsd๐Ÿ”ฑ but will never reach it ๐Ÿ˜ฉ
TypeScript
8
star
6

hello-world

Innocent first test.
JSON
7
star
7

ascended-cat

Scratch for three.js
JavaScript
6
star
8

baby-moofy

A Discord bot in Go that uses Markov chains and listens to conversations to learn how to speak
Go
6
star
9

sgy-sgy

Playing with the Schoology API
TypeScript
5
star
10

longer-tweets

Yet another blog by SheepTester
CSS
5
star
11

dulcinea

Jackbox for Discord, for GunnHacks 7.0
JavaScript
5
star
12

htmlblocks

Drag blocks instead of typing to visualize HTML in a uglier way
HTML
4
star
13

multiplayer-datapack

Hosts an HTTP server for collaborative Minecraft datapack editing using the Monaco editor
TypeScript
3
star
14

a-star

Epic implementation of A* in SCHEME (Racket)
Racket
3
star
15

gamepro5.github.io

A site for Gamepro5
HTML
3
star
16

ornery-bot

With whois from HarVM and wisdom of Wise Guy
Rust
3
star
17

web-server

Web server
JavaScript
2
star
18

themes

Website themes that humans can use
HTML
2
star
19

gunn-map

3D first-person map of Gunn made with three.js; might also turn into a game of some kind
JavaScript
2
star
20

mods

Minecraft mods made from YouthDigital's Mod Design 1 course in 2015
Java
2
star
21

floofy-bot

A simple Discord bot made with Discord.js for personal use
TypeScript
2
star
22

thingkingland

An archive of my first HTML projects
HTML
2
star
23

yesnt

Escape from the YES program before their psuedoscientific methods overtake your vagus nerve!
JavaScript
2
star
24

HEALTH-AMONG-US

BE VERY HEALTHY IN THIS SOCIETY WE LIVE IN AMONG US. POWERED BY AI ๐Ÿš€
JavaScript
2
star
25

sheep-sim

Infection simulator because it's trendy
JavaScript
2
star
26

text-save

Simple thing that stores text locally
JavaScript
2
star
27

gunn-student-sim

A simple text-based game that aims to accurately portray the life of a student at Gunn high school.
JavaScript
2
star
28

olamreee

Olamite periodic table editor
JavaScript
2
star
29

mars

Intellectual Martian incremental game
JavaScript
2
star
30

blocques

Blocks
Rust
1
star
31

falling-sand

falling sand
Racket
1
star
32

calculator

Solves a given equation for X.
JavaScript
1
star
33

skejl

[ABANDONED] A schedule app
CSS
1
star
34

poorcord

A highly verbose Discord bot configuration language in TypeScript using Nearley
TypeScript
1
star
35

server-dancing

Playing around with backend stuff
JavaScript
1
star
36

roots

Greek and Latin roots and affixes
JavaScript
1
star
37

flex10-protect

[ABANDONED] Attempt at a game about whatever happened in the FLEX10 Schoology course
JavaScript
1
star
38

theflat

Sequal to the Hotel and the House
JavaScript
1
star
39

ovinetopia

Sheep-based incremental game
JavaScript
1
star
40

intuitive-gunn-website

[ABANDONED] Attempt at a game
HTML
1
star
41

eyo-dictionary

The list of searchable words
JavaScript
1
star
42

reiglutopia

[ABANDONED] Attempt at a tycoon game (named after Reiglu, our first lava dragon in DragonVale)
JavaScript
1
star
43

cse15l-lab-reports

CSE 15L lab 2: https://ucsd-cse15l-w22.github.io/week/week2/
SCSS
1
star
44

unclear-target-w-very-confusing-critique

For British Classics H satire project
JavaScript
1
star
45

evo

[ABANDONED] Attempted at some evolution simulators
HTML
1
star
46

dumb-multiplayer-server

Using WebSockets for some epic communication skills
HTML
1
star
47

colour

For when someone sends me a hexadecimal color and I'm too lazy to use alternative methods to read it.
HTML
1
star
48

assembly

No electronic devices allowed
JavaScript
1
star
49

offline-ucsd-map

Version of the UCSD campus map (https://maps.ucsd.edu/) that works offline ๐Ÿ—บ๐Ÿคช
TypeScript
1
star
50

fun-gunn-run

Gunn-themed temple run with bad 3D graphics
JavaScript
1
star
51

v2-enforcer

enforces v2
JavaScript
1
star
52

alt-schedule-parser-tester

Tests your Gunn alternate schedule parser.
JavaScript
1
star
53

word-prediction

Using epic markov chains, tries to predict the word that comes next using words from a given dataset. For the Analysis project
JavaScript
1
star
54

toastia

A game of my friends
JavaScript
1
star
55

gunn-confessions-scraper

Scrape stuff from Gunn Confessions' Facebook Page using Python (language diversity!) because Facebook won't give access to their proper APIs
Python
1
star
56

thirty-eight

Expert project for creative writing oof
JavaScript
1
star
57

toki-pona

mi wile sona e toki pona. mi pali e ilo nimi
JavaScript
1
star
58

dating-sim

[ABANDONED] Attempt at a Gunn Confessions game
JavaScript
1
star
59

vanilla-worldgen

Unzipped version of https://github.com/slicedlime/examples/blob/master/vanilla_worldgen.zip so it's easier to review diffs between versions; generated by https://github.com/SheepTester/hello-world/tree/master/slicedlime-vanilla-worldgen
1
star
60

happynumbers

A description that is optional has been filled out but does not describe this repository unfortunately.
HTML
1
star
61

colour-previewer

An HTTP server that previews colours given their hex values
Rust
1
star