Anyfiddle
Search…
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, 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
1
{
2
"openFiles": [
3
"index.js",
4
"static/index.html"
5
],
6
"openDirectories": [
7
"static"
8
],
9
"selectedFile": "index.js",
10
"defaultCommand": "npm start",
11
"port": 3000,
12
"preview": true,
13
"autorun": true,
14
"autoReload": true
15
}
Copied!
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
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
preview
boolean
Enable preview for the project. Preview pane will be shown on the right side
false
autorun
boolean
Should the default command be run when the project is started
false
autoReload
boolean
Should the preview reload automatically on content change. Content change is detected by making HEAD requests to the preview url and checking for etag changes
false
Last modified 9mo ago
Copy link
Contents