# jitscratch

> Compiler of procedure-based MIT Scratch projects to JavaScript

Latest version **1.0.1** (published 2014-07-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install jitscratch
pnpm add jitscratch
yarn add jitscratch
bun add jitscratch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-07-04 |
| First published | 2014-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | bobbybee |
| Maintainers | bobbybee |
| Keywords | scratch, compiler, server |

## Links

- npm: https://www.npmjs.com/package/jitscratch
- Repository: https://github.com/bobbybee/JITScratch
- Issues: https://github.com/bobbybee/JITScratch/issues
- npm.io page: https://npm.io/package/jitscratch

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-07-04
- 1.0.0 — 2014-07-04

## README

JITScratch is a framework for compiling procedure-based Scratch projects to node.js-compatible JavaScript.

It exposes a simple API simple install via npm:

$ npm install jitscratch

Once installed, it exposes a simple, CommonJS interface.

### Hello, World ###
```
var JITScratch = require("JITScratch");

var helloWorld = new JITScratch();
helloWorld.fetchScratchProject(10297480, function() {
	console.log(helloWorld.generateSourceCode());
});
```

### API ###

require("JITScratch"): returns a JITScratch class

JITScratch class:
	
	fetchScratchProject(id, callback)
	
	Fetches a Scratch project off the Scratch website where id is the project ID. callback has no parameters, and calls rawProject with the fetched JSON-representation of the project.
	
	rawProject(json)
	
	Loads the JSON project representation directly into JITScratch
	
	generateSourceCode()
	
	Returns JavaScript source code of the JSON project.
	
	getProcDefs()
	
	Returns an array of block specs used by the procedures, in the order of the procedure function calls in the source code.

---
_Source: https://npm.io/package/jitscratch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
