Docs / Start here
A tour of the window
The tabs at the top, the rail on the left, the code and its output, and the footer.
The tabs
The tabs are the window’s title bar. Each tab holds one Snippet. A tab is named after the Snippet’s first line until you give it a name: double-click the tab to rename it.
- + at the end of the tabs opens the list of Starters.
- ⌘T or Ctrl+T opens a new, empty Snippet of the same Kind as the one on screen.
- The × on a tab closes it. Right-click a tab to close the others, or the tabs to its right.
- ⌘⇧T or Ctrl+Shift+T brings back the tab you closed last. ⌘O or Ctrl+O opens a code file in a new tab. See Open and save files.
- The button at the right end of the tabs is the Layout menu: the code and the output side by side or stacked, or one of them alone.
- On Windows, the Menu button at the left end of the tabs opens the menus (File, Edit, View, Run, Window, Help). On a Mac they are in the menu bar.
JSpark keeps up to 3 tabs open; JSpark+ as many as you like. See Tabs and the Home screen.
The rail
The rail is the column of buttons on the left. From the top:
- Run ⌘↵ or Ctrl+Enter
- Runs the Snippet. It is on the rail when Run as you type is off. While a Run goes on for more than half a second, it becomes Stop (⌘. or Ctrl+.).
- Runs as you type / Runs on demand
- The bolt. Turns running as you type on and off. When the Snippet reaches outside JSpark, a warning shield takes its place, and the Snippet waits for you to run it. See Outside Access.
- Timeline ⌘⇧↵ or Ctrl+Shift+Enter
- Replays a Node Run one Step at a time. See Step Run and the Timeline.
- Add to Library JSpark+
- Keeps a copy of the Snippet in the Library. Saving to the Library is JSpark+.
- Library ⌘⇧L or Ctrl+Shift+L
- Opens your Saved Snippets.
- Packages
- Opens Packages, to find npm packages.
- Settings ⌘, or Ctrl+,
- Opens Settings.
A short name is under each button, such as Save under Add to Library. Hover a button to see its full name, and its keys if it has them. To show the icons alone, turn off Settings → General → Label the menu.
The code and the output
The code is on the left and its output on the right. For a Node Snippet, the output is the console: what the Run printed, and any error. The code also shows the values of your Peeks.
A web page Snippet has its code in Parts, HTML, CSS and JS, on a strip above the code. Its output has two tabs: Page, the page itself, and Console, what the page prints.
Components and hooks
0
−+To put the output under the code, or on the other side, use the Layout menu or the View menu. To show only the code or only the output, use the Layout menu. See Layout and Web pages.
The footer
The footer is the line along the bottom. On the left, it says how the last Run ended, such as Done in 4ms, and when the next one happens, such as Runs as you type. When you have changed the code since that Run, it also says code changed since.
On the right, from the left:
- Language
- JavaScript or TypeScript. See JavaScript and TypeScript.
- Format
- Formats the code.
- Clear console
- Empties the console.
- Expanded or Collapsed by default
- Whether objects the console prints start open or closed.
In JSpark, the last is Get JSpark+, which opens the JSpark+ page in your browser. JSpark+ shows nothing there. To see the buttons as words, set Settings → General → Button style to Words or Icons and words.
The other windows
Three things open in windows of their own.
- Library (⌘⇧L or Ctrl+Shift+L): your Saved Snippets, to search, open and copy. See The Library.
- Packages: search npm and read about a package. See Packages.
- Settings (⌘, or Ctrl+,): every setting, with a search box. See Settings.
Open each from the rail. Library and Packages are also in the Window menu.
Group by key
Turn a list into an object of lists
Theme
For the bar along the bottom and the Timeline. Icons show their names on hover.
Show a name under each button down the left edge. The rail gets a little wider.
When a tab you are closing has changes that are not in the Library. A Starter’s demo, or a snippet just as you saved or opened it, closes without asking.
The pictures show JSpark on a Mac. On Windows, the window buttons are at the top right, the menus are in theMenu button at the left end of the tabs, and shortcuts use Ctrl where a Mac uses ⌘. The rest works the same way.