Configuring anyfiddle.json

You can customise and configure your project and snapshots with by editing anyfiddle.json

anyfiddle.json lets you start a project with a pre-configured state. Any project started with the file (From a starter template or snapshot) will start in this state.

A project opened the second time or later will restore the state from the previous session like open tabs, open files, width and height of components, etc. If the previous session is not present (Incognito mode, another browser/machine), the settings will fallback to the values in anyfiddle.json

Standard anyfiddle.json

anyfiddle.json
{
"openFiles": [
"index.js",
"static/index.html"
],
"openDirectories": [
"static"
],
"selectedFile": "index.js",
"fileSectionWidth": 200,
"terminalSectionHeight": 300
"defaultCommand": "npm start",
"port": 3000
}

Attribute

Type

Description

Default behavior

openFiles

string[]

List of file tabs to be opened

Will open an Untitled file or files from the previous session

openDirectories

string[]

List of directories to be opened in the file explorer tree

No folder will be opened or folders opened in the previous session

selectedFile

string

File tab to be selected and focused

First tab or last selected tab from the previous session

fileSectionWidth

number

Width of the file explorer

250px or width set by dragging in the previous session

terminalSectionHeight

number

Height of the terminal

275px or height set by dragging in the previous session

defaultCommand

string

Command to run on Run button click

The Run button will be disabled and

port

number

Port to map the public preview endpoint to open on clicking the Preview button

Port 8080