CLion also supports React, Angular, Vue.js, and other frameworks and provides tight integration with various tools for web development.
CLion integrates with Jest, Karma, Protractor, Cucumber, and Mocha testing frameworks. CLion 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
Creating a new application
Click Create New Project on the Welcome screen or select File | New Project from the main menu. The New Project dialog opens.
- In the left-hand pane, choose one of the following options:
- Web Starter Kit
- React App
- React Native
In the right-hand pane, specify the path to the folder where the project-related files will be stored, and the version of the project template. 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 Version Control on the Welcome screen or select from the main menu.
In the invoked dialog, select your version control system from the list and specify the repository to check out the application sources from.
Downloading 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.
Configuring code completion for project dependencies
Viewing parameter hints
Parameter hints show the names of parameters in methods and functions to make your code easier to read. By default, parameter hints are shown only for values that are literals or function expressions but not for named objects.
Configure parameter hints
Open the Settings/Preferences dialog Ctrl+Alt+S and go to .
Select Parameter hints from the list, make sure the Show parameter hints checkbox is selected, and then specify the context where you want parameter hints shown.
For some methods and functions, CLion does not show parameter hints in any context. Click Black list... to view these methods and functions, possibly enable parameter hints for them, or add new items to the list.
CLion can generate import statements for modules, classes, components, and any other symbols that are exported. If you are using ES6 in your project, CLion can add missing import statements on the fly, when you complete ES6 symbols.
Alternatively, press Alt+Enter:
If there's more than one possible source of import, CLion shows a list of suggestions:
CLion 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.
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.
Configuring syntax highlighting
In the Settings/Preferences dialog Ctrl+Alt+S, go to .
Select the color scheme, accept the highlighting settings inherited from defaults or customize them as described in Configuring 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.