https://github.com/samelhusseini/blockly-js-decompiler
A Javascript to Blockly decompiler
https://github.com/samelhusseini/blockly-js-decompiler
blockly code-to-blocks decompiler javascript
Last synced: about 1 year ago
JSON representation
A Javascript to Blockly decompiler
- Host: GitHub
- URL: https://github.com/samelhusseini/blockly-js-decompiler
- Owner: samelhusseini
- License: apache-2.0
- Created: 2019-10-17T22:29:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T10:56:11.000Z (about 3 years ago)
- Last Synced: 2025-02-28T19:21:04.968Z (about 1 year ago)
- Topics: blockly, code-to-blocks, decompiler, javascript
- Language: JavaScript
- Homepage:
- Size: 3.53 MB
- Stars: 9
- Watchers: 4
- Forks: 0
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blockly-js-decompiler
A Javascript to Blockly decompiler.
Note: This decompiler is not complete, and is intended as a showcase of how to
use decompile JavaScript code to Blockly blocks.
## Installation
```bash
npm install blockly-js-decompiler
```
## Usage
```js
import decompile from 'blockly-js-decompiler'
decompile(workspace, code);
```
## How it works
This decompiler works in two steps. First it uses the TypeScript compiler to
create an AST from the JavaScript code.
Once we have an AST, we're able to traverse the AST, creating Blockly blocks
along the way.
## License
Apache 2.0