Skip to main content

Tools

NPM Packages

NPM Packages

The NPM Packages window can be opened from the Tools menu: Tools > NPM Packages.

From here, it's possible to search, add, and remove NPM packages. To search for a package, type a package name in the search box. The search results will be populated when you stop typing. If you want a specific version of a package, add a valid version number to the end of the package name, like this: pad-left@1.2.3.

Search NPM Packages

To add a package from the search results, click on the button labelled Add. This will then trigger the package installation. When complete, the search results will be cleared. The package is now available for import in your code.

Snippets

Snippets

The Snippets window can be opened from the Tools menu: Tools > Snippets.

To create a snippet, click on the plus icon in the bottom left corner of the window. This will create a blank snippet ready for you to populate the name, description and body of the snippet.

Snippets can also be created from the editor's context menu. Selected code will be used as the body of the snippet. If there is no selection, then the whole of the code present in the editor will form the snippet body.

Create snippet

Snippets can be inserted into the editor via the buttons in the bottom right corner of the snippet window. Choosing the Insert Snippet option will insert the snippet into the editor pane of the current tab. Choosing the Insert Snippet in New Tab option will open a new tab and insert the snippet into the editor pane on the new tab.

Snippets can also be inserted via autocomplete. Snippets are matched for autocomplete suggestions based on their name.

Snippet autocomplete

Snippets can be imported or exported via the options menu in the bottom left corner of the snippet window. Exporting your snippets will save them as a JSON file in a location of your choosing on your filesystem.

Import export snippets

Environment Variables

Environment Variables

The Environment Variables window can be opened from the Tools menu: Tools > Environment Variables.

To add an environment variable, enter a key and value into the matching fields of the first row, then click Add. Environment variables can be edited directly within their fields. Click the button labelled Save when done.

environment variable edit

Environment variables can be accessed within your code from the process object: process.env.{key name}