Installation
Install required tools
To start developing JavaScript with PicoScratch MINT, you need to install Node.JS. You can download the installer from the official Node.js website. The faster bun runtime is also supported (Instead of node or npm, use bun).
Create a new project
Create a new directory for your project and run the following command to initialize a new Node.js project:
Linux:
bash
touch main.js
npm init -y
Windows:
cmd
echo. 2>main.js
npm init -y
Install the PicoScratch MINT package
To install the PicoScratch MINT package, run the following command:
bash
npm install psmint
Switch to ES modules
json
{
"name": "my-mint-project",
"version": "1.0.0",
"description": "",
"main": "main.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}