GoLand also supports React, Angular, Vue.js, and other frameworks and provides tight integration with various tools for web development.
GoLand integrates with Jest, Karma, Protractor, Cucumber, and Mocha testing frameworks. GoLand supports running and debugging tests as well as navigation between tests and subjects or between a failed test and the fragment of code that caused the problem.
On this page you will find a short Getting Started Guide that will walk you step by step from creating a web application to debugging and testing it.
Before you start
Create a new application
Click Create New Project on the Welcome screen or select from the main menu. The New Project dialog opens.
In the left-hand pane, select one of the following options:
HTML 5 Boilerplate
To see project options for Angular, Node.js, Vue.js, install and enable corresponding plugins.
In the right-hand pane, specify the path to the folder where the project-related files will be stored. Click Create.
Open the application sources that are already on your machine
Click Open on the Welcome screen or select from the main menu. In the dialog that opens, select the folder where your sources are stored.
Check out the application sources from your version control
Click Get from VCS on the Welcome screen.
Alternatively, selectfrom the main menu.
Instead of Git in the main menu, you may see any other Version Control System that is associated with your project. For example, Mercurial or Perforce.
In the dialog that opens, select your version control system from the list and specify the repository to check out the application sources from. See Check out a project (clone) for details.
When you open a project that was created outside GoLand and was imported into it, GoLand displays a dialog where you can decide how to handle this project with unfamiliar source code.
Select one of the following options:
Preview in Safe Mode: in this case GoLand, opens the project in a preview mode. It means that you can browse the project's sources but you cannot run tasks and script or run/debug your project.
GoLand displays a notification on top of the editor area, and you can click the Trust project… link and load your project at any time.
Trust Project: in this case, GoLand opens and loads a project. That means project is initialized, project's plugins are resolved, dependencies are added, and all GoLand features are available.
Don't Open: in this case GoLand doesn't open the project.
Learn more from Project security.
Optionally, configure the inspection severity and scope. Learn more from Code inspections.
Download project dependencies
Install a package in an empty project
In the embedded Terminal (Alt+F12) , type:
npm install <package name>.
If you already have a package.json file in your project
Right-click the package.json file in the editor or in the Project tool window and choose Run 'npm install' from the context menu.
npm installin the Terminal Alt+F12.
Configure code completion for project dependencies
To provide code completion for project dependencies, GoLand automatically creates a node_modules library. In context of the language and the IDE, a library is a file or a set of files. Functions and methods of these files are added to GoLand's internal knowledge in addition to the functions and methods that GoLand retrieves from the project code that you edit.
View inlay hints
Inlay hints appear in the editor and provide you with additional information about your code to make it easier to read.
Type hints show the types of variables, fields, or parameters. The types of variables and fields are displayed to their definition. Type hints for parameters are shown in function calls. Type hints are inferred from JSDoc comments or static analysis of your code.
Configure type annotations
Open the Settings/Preferences dialog (Ctrl+Alt+S) and go to .
In the tree of categories, expand.
Expand the Type annotations node and specify the context where you want type hints to be shown.
The preview shows how the changes you make in the settings affect the code appearance.
GoLand can generate import statements for modules, classes, components, and any other symbols that are exported. GoLand can add missing import statements on the fly, when you complete ES6 symbols or CommonJS modules. GoLand either decides on the style of the import statement itself or displays a popup where you can choose the style you need.
Add ES6 import statements
If you are importing a symbol from your project into a file that is a ES6 module or that already contains ES import statements, GoLand automatically inserts an ES6 import on symbol completion.
Alternatively, press Alt+Enter:
If there's more than one possible source of import, GoLand shows a list of suggestions:
GoLand can also generate import statements for symbols defined in the project’s dependencies. Auto-import works for symbols from packages that contain TypeScript definition files (like in moment or redux) or sources written as ES modules.
If the current file already contains a ES6 import statement, GoLand inserts a new one also in the ES6 style.
Add CommonJS (require) import statements
If you are importing a symbol from your project into a file that already is a CommonJS module (with a
require statement or
module.export), GoLand automatically inserts a CommonJS import on symbol completion.
Alternatively, position the caret at the symbol to import, press Alt+Enter, and select a quick-fix with the CommonJS (
require) import style.
Configure auto import
To configure the appearance of
importstatements, open the Settings/Preferences dialog (Ctrl+Alt+S), go to , and use the controls in the Imports tab, see Imports tab for details.
Configure syntax highlighting
In the Settings/Preferences dialog (Ctrl+Alt+S), go to .
Select the color scheme, accept the highlighting settings inherited from the defaults or customize them as described in Colors and fonts.
Do one of the following:
Choosefrom the main menu or press Alt+F2. Then select the desired browser from the list.
Hover your mouse pointer over the code to show the browser icons bar: . Click the icon that indicates the desired browser.