Quantcast
Channel: WebStorm: The Smartest JavaScript IDE – WebStorm Blog | JetBrains
Viewing all 79 articles
Browse latest View live

WebStorm 11 released: better TypeScript support, Flow, Angular 2, and more

$
0
0

We are very excited to announce today the release of WebStorm 11! This major update is aligned with updates for other JetBrains products that comprise JetBrains Toolbox.

Download and install WebStorm 11 right now!

WebStorm 11 refines your web development experience by adding support for powerful cutting-edge technologies and thoroughly improving the core functionality of the IDE. New features in WebStorm 11 include:

  • Improved TypeScript support: WebStorm 11 now fully supports the latest TypeScript 1.6 features and brings coding assistance for JSX and ES2015 features to TypeScript code. WebStorm also adds integration with TSLint
  • Flow and React support improvements: We’ve added basic support for Flow type annotations, and improved code completion and navigation for React components.
  • Initial support for Angular 2: WebStorm 11 provides code completion for Angular 2 binding, components and new event attributes in TypeScript and ECMAScript 2015
  • npm scripts: A new tool window lists all tasks in package.json and allows you to run any of them with a simple double-click.
  • Yeoman integration: Hundreds of new project generators are available right from the IDE Welcome screen, thanks to the new integration with Yeoman.

Among other notable updates are improved support for ECMAScript 2015, the option to run a single Mocha test, a new Preview mode for Find in path, support for debugging projects built with Webpack, new Node.js configuration and inspections, improved Dart support powered by the Dart Analysis Server, and much more.

For a more detailed overview please visit What’s new in WebStorm 11, and download the IDE for your OS.


WebStorm 12 EAP, 144.2925: debugging async code, smarter auto imports and more

$
0
0

A fresh WebStorm 12 EAP build (144.2925) is now available!

You can download it here and install it side-by-side with your stable version of WebStorm. Or if you’re subscribed to the EAP update channel in the IDE and have already installed a previous EAP build, you should get a notification about a patch-update.

If you missed the announcement of WebStorm 12 EAP, you can catch up on it in this blog post.

Inline rename for TypeScript

You can now use Rename refactoring in the TypeScript code inline. That means that you can just hit Shift-F6, change the name right in the editor and it will be instantly refactored across the whole project, no Rename dialog anymore.

inline-rename-for-ts

Smarter imports

Auto imports in TypeScript became smarter: now symbols from one module are automatically added into one import statement.

Before that, when you type, for example, @Injectable, the import would have generated the following way:

auto-imports

And now:

smarter-imports

This behaviour could be configured in Preferences | Editor | General | Auto imports.

And with a new Optimize imports actions (Ctrl-Alt-O) WebStorm can merge imports that are already typed in the similar way. This works now only for the TypeScript files, but we will extend it to ES6 files as well.

Debugging async code

WebStorm now allows you to debug asynchronous client-side code in Chrome: check the Async checkbox on the debugger pane and now once a breakpoint inside an asynchronous function is hit or you step into that code, you can see a full call stack, including a caller and all the way to the beginning of asynchronous actions.

async-debug

Improvements in Angular 2 support

This WebStorm 12 EAP build brings smarter code insight for one-way binding in Angular 2 applications. Now you can get jump from the binding in the component usage to the property in the component definition.

ng2

Coding assistance for component names in HTML and event attributes is now fixed when working with angular2-beta.

WebStorm running on Java 8

The whole IntelliJ IDEA platform migrates to Java 8. That means that now you can not launch WebStorm under a JDK older than Java 8. The change affects all the EAP builds (144.*) and further major releases in Spring, 2016.

The list of issues addressed in this EAP build is available in the Release notes.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

Read more about the features and improvements added in the WebStorm 12 EAP builds:

  • WebStorm 12 EAP, 144.3143: Unused imports warning, code assistance in tsconfig.json,.babelrc and .eslintrc, remote run and debug for Node.js apps, Vagrant integration, debugging Electron apps, and further improvement in Angular 2 support.

– JetBrains WebStorm Team

WebStorm 12 EAP, 144.3143: remote debug for Node.js, unused imports warning, debugging Electron and more

$
0
0

A new WebStorm 12 EAP build is now available! The highlights of this update include: running and debugging Node.js apps remotely from the IDE, unused import warning for JavaScript and TypeScript, more improvements in Angular 2 support, and more.

As always, you can download it here or, if you have a previous EAP build (144.2925) installed, you should soon get a notification in the IDE about a patch update.

Read about the features and improvements added in other WebStorm 12 EAP builds:

  • WebStorm 12 EAP, 144.3600: Support for Git worktrees, updated look and feel of the Git Log, Missing import statement inspection for JavaScript.
  • WebStorm 12 EAP, 144.3357: SSH Console, Extract field refactoring in TypeScript, support for debugging Node.js apps built with Webpack, and more.
  • WebStorm 12 EAP, 144.2925: Inline rename, smarter auto-imports and Optimize imports action for TypeScript, debugging async client-side code, and improvements in Angular 2 support.

Unused imports warning

WebStorm will now highlight any unused ES6 imports in JavaScript and TypeScript files.

remove-unused-import

With Optimize imports (Ctrl-Alt-O) (which now also works in JavaScript files), you can get rid of any unused imports and merge multiple import statements for symbols from one module. Or you can remove each unused import individually using a quick-fix – just press Alt-Enter on the highlighted import.

Code folding for ES6 imports

Import statements in JavaScript and TypeScript files are now folded by default.

es6-imports-folded

With the updated Related symbols… action (Cmd-Ctrl-↑ on OS X, Ctrl+Alt+Home on Windows and Linux), you can see the list of imported symbols and jump to their definitions.

Code assistance in tsconfig.json, .babelrc and .eslintrc

WebStorm now provides smarter code completion based on JSON Schemas in tsconfig.json, .babelrc and .eslint configuration files. Press Alt-Enter or just start typing to get a list of all properties and their available options.

completion-tsconfig

Remote run and debug for Node.js apps

One of the biggest new features in WebStorm 12 EAP is that you can now run and debug your Node.js apps on a remote server or Vagrant box right from the IDE.

To set up a Remote Node.js interpreter, click the button to the right of the Node.js interpreter field in the Node.js run/debug configuration. Then click + and select Add Remote. You can configure a remote interpreter using an existing SFTP deployment configuration or Vagrantfile, or by entering SSH credentials.

add-node-interpreter

If you’re using SSH credentials, you need to configure a mapping between the local project root and its remote location in your run/debug configuration.

Then specify the JavaScript file you need to run, save the configuration and you’re ready to go – put the breakpoints in your code and click Debug.

node-rc

debug-node-remotely

Vagrant integration

Integration with Vagrant is now available in WebStorm out-of-the-box. You can run, reload and stop the Vagrant box from the IDE, without using the command line.

Press Cmd-Shift-A, type Vagrant and press Enter to access the list of available Vagrant commands or assign this action to a shortcut of your choice in Preferences | Keymap.

vagrant

Angular 2 support improvements

Lots of improvements in Angular 2 support have landed in this EAP build.

Paths in templateUrl and styleUrls fields are now resolved and you can in one click jump to the file.

WebStorm will now inject JavaScript inside any bindings so you can enjoy code completion.

angular2-completion

You can now get coding assistance and type inference for the variables defined in the template.

angular2-variables

Other improvements include code completion and resolve of custom event handlers defined in the component with the @Output decorator.

amgular2-events

Debugging Electron applications

Now you can debug Electron applications with WebStorm.
To debug the app’s main process, you need to create a Node.js run/debug configuration and specify the path to the Electron executable in the Node.js interpreter field. To debug packaged apps, specify the path to Electron inside the built app (for example, on Mac that would be your_app.app/Contents/MacOS/Electron).

If you’d like to debug the render process, first start the app with the --remote-debugging-port= option. Then create a Chromium remote run/debug configuration, specify that port number and start the debugger. That’s it!

Start run and debug configurations while indexing

We’ve made it possible to start run/debug configurations while your project is still indexing. For example, you can now start a build task or run your Node.js app. Please note that there might be some limitations when you start the debugger while indexing is in progress.

And finally, check out some new features coming to WebStorm from IntelliJ Platform:

  • support for right-to-left languages in the editor
  • by-word difference highlighting in all diff dialogs
  • an option to compare revisions of a file between branches in Mercurial

by-word-diff

The full list of issues addressed in this EAP build is available in the Release notes.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

– JetBrains WebStorm Team

JavaScript Annotated – January 2016

$
0
0

Keeping up with everything that’s going on in the web development community and the JavaScript ecosystem can be challenging. With lots of articles and blog posts that we on the WebStorm team go through on a regular basis, we thought we’d share some that we enjoyed and discussed the most over the past month.

We’re not going for the most comprehensive digest out there, but want to focus mainly on covering the technologies already supported in WebStorm as well as the industry’s best practices.

JavaScript, libraries and frameworks

Dr. Axel Rauschmayer, who’s well known for his blog 2ality and multiple books about JavaScript, has started a new weekly email newsletter, ES.next News.

Jake Archibald in his blog talks about web streams and how they will help us take even more control over network processes and improve the performance of web pages.

On January 14 jQuery celebrated its 10th birthday and is still one of the the most popular frameworks for web development. John Resig, the author of jQuery, shares his memories and jQuery milestones. On the same day jQuery 3.0 reaches beta… and it no longer supports IE6-8.

If you’ve missed this news, as of January 12, 2016, Microsoft has ended support for older versions of Internet Explorer (versions 6-8).

Péter Márton shares his perspective on the best practices for developing React apps in 2016. We think the only thing missing is WebStorm :) Don’t forget to check out the WebStorm tips on coding assistance, linting and refactoring for React developers.

One of January’s most discussed articles was Cory House’s critical comparison of Angular 2 and React. By the way, support for both frameworks saw some noticeable improvements in WebStorm 12 EAP. Unfortunately or luckily for us all, there’s no silver bullet. JavaScript fatigue and the state of modern web development also were hot topics this January.

Node.js

In January Microsoft open sourced ChakraCore, part of their JavaScript engine, and sent a pull request to enable Node.js to work with ChakraCore. The Microsoft team shows some performance improvements when using Node.js with ChakraCore for some real-life tasks, as compared to the current Node.js version with V8.

While that pull request is still going through the code review, the Node.js community is discussing plans for moving toward VM neutrality.

Sacha Greif, a co-author of Discover Meteor, talks about the current state of the Meteor platform and what went wrong, and shares his hopes for Meteor becoming a back-end platform for building React apps in the future.

Tools

The Battle of Task Runners is far from over. Cory House shares his experience of moving from Gulp and Grunt to writing npm scripts (good that WebStorm supports them all, right?!). He believes that Gulp and Grunt introduce redundant abstractions that make debugging really complicated and the whole build process too unstable and too dependent on dozens of plugins.

And a bit more on npm:

We hope you’ve enjoyed this overview of January’s trending web topics. We’ll be super happy to hear your feedback on this blog post! Did you like it? Should we continue this type of posts? Let us know!

WebStorm 12 EAP, 144.4199: CSS Custom Properties, and fixes

$
0
0

Welcome a new WebStorm 12 EAP build (144.4199)!

As always, you can download it here or, if you have a previous EAP build (144.3891) installed, you should soon get a notification in the IDE about a patch update.

Support for CSS Custom Properties

WebStorm adds support for CSS Custom Properties based on the W3C recommendations.

You can get code completion for variable names:

completion-for-css-vars

From a variable you can jump to its definition with the Cmd-Click (Ctrl-Click), see its quick definition or find its usages.

WebStorm would also validate the default value and parameter info.

css-prop-warning

Coding assistance for classes and ids in CSS

Now when you type a selector in a CSS file, WebStorm will suggest you classes and ids used in your HTML and CSS files. That also works for Sass, SCSS and Less.

completion-for-selectors

Install missing module from npm

WebStorm will now suggest you to install a module in the import statement, if it’s available on npm and add it to the package.json.

install-dependency

More improvements in Angular 2 support

You can now enjoy smarter coding assistance for directives inside Angular 2 inline templates.

ng-directive

Trailing commas in function parameter lists and calls

This ES7 feature proposal is now supported in WebStorm when JavaScript language version is set to ECMAScript 6.

trailing-comma

The full list of issues addressed in this EAP build is available in the Release notes.

Read about the features and improvements added in previous WebStorm 12 EAP builds:

  • WebStorm 12 EAP, 144.3891: Debugging Web workers, improvements in Dart support.
  • WebStorm 12 EAP, 144.3600: Support for Git worktrees, updated look and feel of the Git Log, Missing import statement inspection for JavaScript.
  • WebStorm 12 EAP, 144.3357: SSH Console, Extract field refactoring in TypeScript, support for debugging Node.js apps built with Webpack, and more.
  • WebStorm 12 EAP, 144.3143: Unused imports warning, code assistance intsconfig.json.babelrc and .eslintrc, remote run and debug for Node.js apps, Vagrant integration, debugging Electron apps, and further improvement in Angular 2 support.
  • WebStorm 12 EAP, 144.2925: Inline rename, smarter auto-imports and Optimize imports action for TypeScript, debugging async client-side code, and improvements in Angular 2 support.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates

– JetBrains WebStorm Team

Angular 2 workflow in WebStorm

$
0
0

WebStorm is well-known for its AngularJS 1 support. WebStorm 2016.1 introduces lots of new exciting features in Angular 2 support. Combining that with support for the latest TypeScript and ECMAScript 6 (2015) features, WebStorm can be a great playground for your new Angular 2 applications.

Join us for a live webinar WebStorm: Angular 2 Tips and Tricks featuring John Lindquist on May, 11th. Register now!

In this blog post we’d like to share with you some tips and tricks that we hope you’ll find useful when working on Angular 2 apps in TypeScript in WebStorm 2016.1. We’ll have a look at:

Disclaimer: This blog post is not intended as a tutorial for getting started with Angular 2. If you’re new to Angular 2, we suggest you to go through the Angular 2 Quickstart first. While Angular 2 is still in Beta, there might be some changes in the framework that can affect the way Angular-specific coding assistance works in WebStorm.

Angular 2 and TypeScript support are also available in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Professional, and RubyMine, all version 2016.1. Make sure that you’ve installed AngularJS plugin: go to Preferences | Plugins – Install JetBrains plugins and search for AngularJS.

Let’s see what you can do with WebStorm!

Installing Angular 2

To make WebStorm understand Angular 2 syntax, we need to have Angular 2 library files in our project.

The easiest way to add Angular 2 to the project is using npm. If you don’t have package.json file in the project yet, run in the terminal opened in the application’s root folder: npm init -y

Then run: npm install angular2 --save

Tip: If you have already added a package.json file in your project, you can just right-click it in the IDE Project view and use Run npm install action.

Make sure that node_modules folder with angular2 in not excluded from the project.

Alternatively, you can add angular2.dev.js file as a JavaScript external library in WebStorm as described here.

Auto imports in TypeScript

One of the great advantages of using typed languages like TypeScript is that you get far more precise and intelligent coding assistance, which helps you write better code more efficiently.

To define a component in our Angular application, we use @Component decorator. It needs to be imported from the Angular 2 library.

WebStorm can import symbols from other files and modules automatically. So you can just start typing @Component or, for example, a class defined in the project and WebStorm will just take care of the import statement. By the way, imported symbols from the same module are nicely put in one import statement.

auto-import-ts

You can disable auto imports in Preferences | Editor | General | Auto Import. You can still add the import by hitting Alt-Enter on the unresolved symbol and selecting Add import statement.

If you want to import everything you need first, start typing the import statement and WebStorm will suggest the files and modules to import as well as the symbols available in them.

completion-for-imports

For all unused imports, WebStorm will show a warning. With the Optimize imports action (Ctrl-Alt-O), you can easily clean up all the unused imports and merge related import statements from the same file into one line.

optimize-imports-ng

Code completion in Angular 2 components and templates

WebStorm will provide you with code completion results for any functions, methods, and properties, as well as for Angular-specific event and property bindings and inside them.

Here are a few examples:

angular2-event

angular2-completion

Inside any template you’ll get code completion for methods defined in the component:

angular2-directive-inline

Code completion suggestions and resolve work for custom event handlers defined in the component with the @Output decorator, for example:

angular2-custom-event

If you’ve defined a variable inside the template, you’ll get coding assistance and type inference for it later in the same template.

angular2-variables

In @Component decorator we can see suggestions for available properties, such as selector or template.

angular2-method-field

Documentation lookup

With the caret on Angular 2 methods or functions, you can press F1 to quickly view documentation. You can also invoke Documentation right from code completions results.

angular2-doc

Navigation

One of the most useful shortcuts for navigating around the code is Ctrl-click (or Ctrl-B) on Windows and Linux and Cmd-click or Cmd-B on OS X – it takes you to the definition of any class, function, method, variable or component. It also allows you to jump to a different module from the import statement.

Some Angular-specific navigation includes:

  • Navigation to the file from the path in styleURLs and templateURL.
  • Jumping to the component definition (to the @Component where you have specified its name it the selector parameter) from its usage in the HTML file.
  • Navigation from a one-way binding in the component to the property defined using @Input in the component definition.

angular2-nav-to-input

Press Ctrl/Cmd-Alt-Left arrow to navigate right back to where you were.

Refactoring Angular 2 components and methods

Refactoring options available in WebStorm can be a real time saver.
For component names you can use Refactor – Rename. Press Ctrl-T on the tag or selector property in the component definition and then select Rename.

angular2-rename-component

Rename also works for custom event handlers, class names and methods defined in the component.

angular2-rename-method

Compiling TypeScript

If you don’t have a fully set-up built process for your app, you may want to try a built-in TypeScript compiler. You can read about it in our How to compile TypeScript blog post.

– JetBrains WebStorm Team

Live webinar: WebStorm – Angular 2 Tips and Tricks

$
0
0

Join us Wednesday, May 11th, 12:00 PM – 1:00 PM EDT (New York) / 18:00 – 19:00 CEST (Berlin) (check other time zones) for our free live webinar WebStorm: Angular 2 Tips and Tricks, featuring John Lindquist.

Angular 2 is a big upgrade from Angular 1. Now you need to know classes, TypeScript, modules, and on and on. Luckily WebStorm 2016.1 has kept up with all these changes and provides excellent support to help you navigate through all the new features. Come join us as John Lindquist, founder of egghead.io, walks us through all the new features of WebStorm that can help make your transition to Angular 2 smooth as butter.

We believe that this webinar is going to be interesting for anyone interested in Angular 2 and TypeScript and working in WebStorm and other IntelliJ IDEA-based IDEs.

Space is limited, please register now.

The recording will be available after the webinar.

John LindquistJohn Lindquist has spent the majority of his career developing Rich Web Applications. Before starting egghead.io, John worked at JetBrains as a WebStorm evangelist, and before that he was a Technical Architect at Isobar leading large teams in building the latest and greatest in web apps for the Air Force, HBO, and Bloomberg.

WebStorm 2016.2 Early Access Preview

$
0
0

We are happy to announce the start of the Early Access Preview for WebStorm 2016.2, the next big update for WebStorm. You can download WebStorm 2016.2 EAP, build 162.74, right now. You can install it side by side with WebStorm 2016.2 or any previous WebStorm version. No active subscription is required.

While we don’t have that many big new features to show you right now, we hope you’ll still enjoy some of the improvements and fixes that have already landed in WebStorm 2016.2.

Coding assistance for props in React and more

WebStorm can now understand component properties defined using propTypes and provide code completion and resolve to them.

props-react

Another nice improvement for React developers is that now WebStorm will automatically add {} instead of “” for React events like onClick, onChange, etc. Moreover, the IDE now understands React non-DOM attributes: key, ref and dangerouslySetInnerHTML.

There’s also a bunch of improvements in React support in TypeScript, like auto imports for components and coding assistance for components properties.

Support for Angular 2 Release candidate

WebStorm 2016.2 EAP brings updates to the Angular 2 support: it now understands variable declarations with let inside the structural directives such as *ngFor and provides proper auto imports  with paths starting with @angular for Angular 2 RC.

ng2-rc

Improvements in TypeScript support

In TypeScript you can now enjoy a smarter support for enums.

enum-ts

Single vs double quotes in HTML attributes

You can now configure whether you want IDE to add single, double or no quotes at all when autocompleting attributes in HTML and JSX. The option is available in Preferences | Editor | Code style | HTML – Other – Generated quote marks.

single-quotes

Code coverage for Dart

Run with Coverage option is now available for the Dart command-line app run configuration. It’s not yet supported for Dart Test because of the Pub tool limitation.
In addition to that, you can now use other language injection in string literals and navigate through the Call hierarchy for Dart code.

The bigger list of issues addressed in this EAP build you can see on our issue tracker.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

– JetBrains WebStorm Team


Webinar recording: WebStorm – Angular 2 Tips and Tricks

$
0
0

The recording of our May 11th webinar featuring John Lindquist, WebStorm – Angular 2 Tips and Tricks, is now available on JetBrains YouTube channel.

Angular 2 is a big upgrade from Angular 1. Now you need to know classes, TypeScript, modules, and on and on. Luckily WebStorm 2016.1 has kept up with all these changes and provides excellent support to help you navigate through all the new features. In this webinar John Lindquist, walks us through all of these new features in Angular 2 support and shares his productivity tips for working with Angular 2 in WebStorm.

You can reach John on Twitter @johnlindquist and check his Angular 2 videos on egghead.io.

Here are some commons questions from the webinar Q&A session:

Q: How can I enable Angular 2 support in IntelliJ IDEA, PhpStorm, PyCharm or RubyMine?
A: Angular 2 support is provided by the AngularJS plugin developed by JetBrains. You can install it in Preferences – Plugins. This plugin provides the same functionality related to Angular support you may find in WebStorm.

Q: What’s the best way now to create a new Angular 2 project?
A: It’s recommended to use Angular CLI. At the moment it’s not yet integrated with WebStorm, but we plan to work on that in WebStorm 2016.2 and make it possible to create new Angular 2 projects right from the IDE Welcome screen. There’s also the Angular 2 seed project on Github that shows how to use Angular 2 with Webpack.

Q: When will Angular 2 RC be supported in WebStorm?
A: The changes introduced in Angular 2 Release Candidate are now supported in WebStorm 2016.2 Early Access Preview, that you can downloaded here.

Want to learn more about Angular 2 support in WebStorm? Have a look at our recent blog post.

– JetBrains WebStorm Team

WebStorm 2016.1.3 is now available

$
0
0

WebStorm 2016.1.3, a new bug fix update for WebStorm 2016.1, is now available!

This update brings Angular 2 RC compatibility (the IDE now understands variable declarations with let inside the structural directives such as *ngFor and provides proper auto imports with paths starting with @angular), support for the scoped npm packages, and improvements in the TypeScript support and integration with the build tools. You can find the full list of addressed issues in the release notes for the builds 145.1616 and 145.1503.

A patch-update from WebStorm 2016.1.2 and 2016.1.3 EAP should be available.

Your WebStorm Team

WebStorm 2016.2 EAP, 162.646: Angular CLI, ligatures, and debugging in Firefox

$
0
0

The new WebStorm 2016.2 EAP build (162.646) is now available! You can download it here or, if you have installed the previous WebStorm 2016.2 EAP build (162.426), you should soon get a notification in the IDE about a patch update.

Angular CLI and code snippets

Thanks to the integration with Angular CLI,  you can now create new Angular 2 projects with ease. Install angular-cli globally via npm, click Create new project on the IDE Welcome screen, select Angular CLI from the list of project templates, enter a project name, and click Create.

angular-cli

In addition to that, we’ve added a collection of Angular 2 code snippets developed by John Papa and adapted to WebStorm by Reto Ryter.

The list of templates is available in Preferences | Editor | Live templates. To use a template, type its abbreviation in the editor and then press Tab to expand it. Press Tab again to jump to the next edit location in the template.

ng2-snippet

Support for fonts with ligatures

The editor in WebStorm now supports fonts with programming ligatures, like Fira Code, Monoid or Hasklig.

ws-ligatures

Install the font in your OS, select it in Preferences | Editor | Colors and Fonts | Font , make sure you have Enable font ligatures option checked, and enjoy beautiful fonts.

Debugging in Firefox 36+

WebStorm now allows you to debug JavaScript apps in Firefox 36+ using Firefox Remote debug configuration.

You should first enable Remote debugging in Firefox settings (Tools | Web developer | Toggle tools, click the Gear icon and check Enable remote debugging). Then again go to Tools | Web developer and select Developer toolbar to open the Firefox command line. Run the following command: listen 6000, where 6000 is the port number you’d like to use.

In WebStorm, create a new Run/debug configuration of Firefox Remote type. Enter the port name that Firefox is listening on. Open your app in the browser, put breakpoints in the code and start a debug session in WebStorm.

Run build tasks before Run or Debug

Now you can specify any Grunt, gulp or npm task as a Before launch task for a Run/Debug configuration. This way WebStorm will first execute this task, when you start a configuration, and only once it’s finished will it start the run/debug session.

The full list of issues is available in the Release notes.

Read about the features and improvements added in previous WebStorm 2016.2 EAP builds:

  • WebStorm 2016.2 EAP, 162.232: Working with patches in VCS is now easier. Drag images, JavaScript or CSS files into an HTML file in the editor to generate src, script or link tags for them. New .let and .const postfix templates have been added.
  • WebStorm 2016.2 EAP, 162.74: Improved React support (coding assistance for props, auto imports for components in TSX, and more), smarter support for enums in TypeScript, and improved Dart support.

Please share your feedback and report any issues to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

Your WebStorm Team

The Drive to Develop

WebStorm 2016.2 released: TypeScript 2.0, improved support for React, Angular CLI, and more

$
0
0

Please welcome the official release of WebStorm 2016.2, the second update for our JavaScript IDE this year. This update brings even better experience while editing and refactoring JavaScript and TypeScript code and steps up the IDE’s debugging capabilities.

Download WebStorm 2016.2 for your OS on the What’s new page on our website.

Here are the highlights of this update:

  • Support for the upcoming TypeScript 2.0 features.
  • Improvements in React support: coding assistance for component properties defined using PropTypes, support for non-DOM attributes and lifecycle methods.
  • Integration with Angular CLI for creating new projects and the collection of Angular 2 code snippets.
  • New intentions for upgrading to ECMAScript 6: Convert to arrow function and Convert to const or let.

In other updates, you can now take advantage of support for jspm imports, support for fonts with ligatures in the editor, improvements in working with VCS patches, and more.

For a more detailed overview please visit What’s new in WebStorm 2016.2.

Your WebStorm Team

WebStorm 2016.3 Early Access Preview: Flow, PostCSS, and more

$
0
0

Back from the summer vacations, we are ready to announce the start of the Early Access Preview for WebStorm 2016.3, the third (!) major update coming this year.

Today’s EAP build brings lots of new exciting features, and more are coming later in September! Download WebStorm 2016.3 EAP, build 163.3094.20, right now.

You can install it side by side with WebStorm 2016.2 or any previous WebStorm version. No active subscription is required. Please note that this is a pre-release version of WebStorm. We would appreciate your feedback on our issue tracker.

Integration with Flow

Flow is a static type checking system for JavaScript, developed by Facebook. Just a couple of weeks ago Flow became available on Windows and we’re happy to announce that you can now easily use Flow in WebStorm to analyse your code.

flow

Set JavaScript version to Flow in Preferences | Languages & Frameworks | JavaScript and check that the path to your locally or globally installed Flow is set correctly in Preferences | Languages & Frameworks | JavaScript | Flow (the UI will change before release). That’s it!

Now all the files that begin with // @flow are going to be analysed with Flow and the errors are going to be reported right in the editor. If you change a file with a function definition, you don’t need to save it manually to trigger Flow to check its usages, it all works seamlessly.

PostCSS support

Good news for those using PostCSS – an official plugin for the PostCSS support is now available. You can install it via Preferences | Plugins – just search for PostCSS.

WebStorm now provides full-featured support for PostCSS with intelligent code completion, navigation, inspections, configurable code style and auto-formatting, as well as the Rename refactoring for custom selectors and media queries. Read more in the plugin description.

postcss

If you write PostCSS code in files with a .css extension, you will need to associate these files with PostCSS in Preferences | Languages & Frameworks | CSS Dialects to enable PostCSS support.

The following PostCSS plugins are supported: postcss-custom-properties, postcss-apply, postcss-custom-media, postcss-media-minmax, postcss-custom-selectors, postcss-nesting, and postcss-nested.

Smarter Rename for TypeScript

Rename refactoring in TypeScript now works through the inheritance hierarchy.
Now when you want to rename a method in a class, WebStorm will make sure that it’s also renamed in a parent class or in an interface. It also works the other way around: when renaming something in an interface or a parent class descendants are renamed as well.

ts-rename

In addition to that, Go to implementation… now works better for classes and interfaces.

More Angular CLI

Angular CLI commands that allow you to generate components, directives, services, and other blueprints are now available in Angular 2 projects (generated with Angular CLI) right in the New… popup (Cmd-N on OS X or Alt-Insert on Windows and Linux).

ng-cli

Grouped files in Project view

WebStorm now automatically displays generated files grouped with a source file located in the same folder in the Project view, for example, .css and .css.map files will be grouped with a .sass file with the same name. This will also work for some other patterns like .ts – .js – .js.map or .pug – .html.

grouped-files

Generate .editorconfig

You can now generate an .editorconfig file based on the current IDE code style settings. Go to Preferences | Editor | Code style – EditorConfig and hit Export – an .editorconfig file will added to the project root.

editorconfig

Spaces around arrow functions

With a new code style option you can configure adding spaces around arrow operator in JavaScript and TypeScript when reformatting the code or when using Convert to arrow function intention. Check Preferences | Editor | Code style | JavaScript – Spaces – Around operators.

You can find a more detailed list of issues addressed in this EAP build on our issue tracker.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

– JetBrains WebStorm Team

WebStorm 2016.3 EAP, 163.4396: Create React app

$
0
0

WebStorm 2016.3 EAP build (163.4396) is now available! You can download it here. Unfortunately, there’re no patch-updates available this time.

Create React App

Create React App is an officially recommended way to create new React apps. And now you can create new apps using Create React App right from the IDE Welcome screen!

create-react-app

Make sure that you have create-react-app installed globally on your computer, for that run npm install -g create-react-app. Then to start your new project, double click on the start task in the npm tasks tool window to run it. That’s it!

Improvements in Angular 2 support

When providing code completion and resolve for methods in the Angular 2 templates, WebStorm now understands available type info and therefore provides more precise results.

ng2-methods-completion

In addition to that, in the TypeScript projects all compiled JavaScript files are now automatically excluded, so that they won’t appear in resolve, find usages, search results, etc. Please let us know what you think about it.

You can find a more detailed list of issues addressed in this EAP build in the Release notes.

Learn more about other new features in WebStorm 2016.3:

  • WebStorm 2016.3 EAP, 163.3094: Integration with Flow; PostCSS support; Smarter Rename for TypeScript; More features in Angular CLI integration; Grouped generated files in the Project view; Option to generate an .editorconfig file; Code style option for arrow functions.
  • WebStorm 2016.3 EAP, 163.3512: Integration with Docker for Node.js apps; Bundled Fira Code font; San Francisco font is default on OS X; Flow tool window with file and project errors.
  • WebStorm 2016.3 EAP, 163.3983: ESLint autofix; Automatically detecting TypeScript version in the project; Undo commit action; Test names now available in the Go to symbol.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

– JetBrains WebStorm Team

WebStorm 2016.3 EAP, 163.4830: Stylelint, usages for default exports, and more

$
0
0

Please welcome a new WebStorm 2016.3 EAP build (163.4830)! You can download it here, or if you have the previous EAP build (163.4396) from the last week installed, you should soon get a notification in the EAP about a patch update.

Integration with Stylelint

WebStorm adds integration with Stylelint, a code quality tool for stylesheets. You can now see the errors reported by Stylelint right in the editor.

stylelint

To get started, install Stylelint globally or locally in your project via npm, add .stylelintrc file with the Stylelint configuration and then enable the integration in Preferences | Languages & Frameworks | Stylesheets | Stylelint. That’s it! Stylelint errors will be shown in the editor. Hover over the highlighted code to see the error description.

Find usages for ES6 default exports

You can now find usages for default-exported functions or classes: press Alt-Cmd-F7 on OS X or Ctrl+Alt+F7 on Windows and Linux on the export  to see usages in a popup or press Alt-F7 to see usages listed in a tool window.

find-usages-default-export

Updated Angular 2 code snippets

Angular 2 has been finally released, yay! We’ve updated the collection of the Angular 2 Live templates in WebStorm to comply with John Papa’s recommendations.

In addition, we’ve fixed some issues with duplicates in import suggestions when using Angular 2.0.

TypeScript import can be shortened

A new inspection now warns you if an import statement in the TypeScript code can be shortened. That is very useful when you re-import all classes contained in a directory in the index.ts file.

short-path-in-ts-import

For a detailed list of the issues addressed in this EAP build, please see the Release notes.

Learn more about other new features in WebStorm 2016.3:

  • WebStorm 2016.3 EAP, 163.3094: Integration with Flow; PostCSS support; Smarter Rename for TypeScript; More features in Angular CLI integration; Grouped generated files in the Project view; Option to generate an .editorconfig file; Code style option for arrow functions.
  • WebStorm 2016.3 EAP, 163.3512: Integration with Docker for Node.js apps; Bundled Fira Code font; San Francisco font is default on OS X; Flow tool window with file and project errors.
  • WebStorm 2016.3 EAP, 163.3983: ESLint autofix; Automatic detection of TypeScript version in the project; Undo commit action; Test names now available in the Go to symbol.
  • WebStorm 2016.3 EAP, 163.4396: Create new React apps with Create React App from the Welcome screen; Improvements in Angular 2 support.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

– JetBrains WebStorm Team


WebStorm 2016.3 EAP, 163.6957: Protractor, TypeScript quick fixes

$
0
0

Another week – another WebStorm 2016.3 EAP (163.6957) build! You can download it here, or if you have the EAP build (163.6512) from the last week installed, you should soon get a notification in the EAP about a patch update.

Integration with Protractor

Protractor is an end-to-end test frameworks developed by the Angular team. And you can now run and debug tests with Protractor right from WebStorm. Test results will be shown in a tool window in the IDE. You can filter the results and see only the failing tests. You can also quickly jump from the list of tests to the test source.

protractor

To get started right-click (or hit Ctrl-Shift-R on macOS or Ctrl-Shift-F10 on Windows and Linux) on the protractor.conf.js file in the project view or in the editor and select Run ‘protractor.conf.js’. Please make sure first that you have Protractor installed globally on your machine.

You can use the same run/debug configuration to debug the tests.

More quick fixes for TypeScript

WebStorm now makes quick-fix options provided by the TypeScript 2.1 language service available in the editor together with the WebStorm’s own quick fixes and intentiones.

Hit Alt-Enter on the highlighted code and see suggestions to automatically fix it (note that quick fixes are available only for some types of errors).

ts-quick-fixes

WebStorm also added the support for TypeScript 2.0.6.

Completion for React Native StyleSheet properties

When working with the React Native apps, WebStorm will now provide code completion (and color preview) for properties inside StyleSheet. 

rn-stylesheet

For a detailed list of the issues addressed in this EAP build, please see the Release notes.

Learn more about other new features in WebStorm 2016.3:

  • WebStorm 2016.3 EAP, 163.3094: Integration with Flow; PostCSS support; Smarter Rename for TypeScript; More features in Angular CLI integration; Grouped generated files in the Project view; Option to generate an .editorconfig file; Code style option for arrow functions.
  • WebStorm 2016.3 EAP, 163.3512: Integration with Docker for Node.js apps; Bundled Fira Code font; San Francisco font is default on OS X; Flow tool window with file and project errors.
  • WebStorm 2016.3 EAP, 163.3983: ESLint autofix; Automatic detection of TypeScript version in the project; Undo commit action; Test names now available in the Go to symbol.
  • WebStorm 2016.3 EAP, 163.4396: Create new React apps with Create React App from the Welcome screen; Improvements in Angular 2 support.
  • WebStorm 2016.3 EAP, 163.4830: Integration with Stylelint; Find usages for ES6 default exports; Updates Angular 2 live templates; New inspection “TypeScript import can be shortened”.
  • WebStorm 2016.3 EAP, 163.5219: Better support for ES6 object destructuring.
  • WebStorm 2016.3 EAP, 163.6110: TypeScript language service is now used by default for code completion and analysis; New inspections for ES6; New icons; Faster search in Git log; Git Remotes management;
  • WebStorm 2016.3 EAP, 163.6512: Debugging React Native apps.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

JetBrains WebStorm Team

WebStorm 2016.3 released: Flow, better TypeScript support, debugging React Native apps, Stylelint, and more

$
0
0

Please meet WebStorm 2016.3, the third big WebStorm update of 2016 jam-packed with new features!

For the past four months we’ve been working hard to improve support for ES6, TypeScript, and Flow and integrate more tools into the IDE, to help you develop more smoothly and productively not only for the web but also for mobile.

Visit What’s new in WebStorm 2016.3 to see a full overview of its new features or watch an overview video below.

And here’re some of the highlights:

  • Support for Flow: type errors are reported right in the editor; Flow-powered code completion
  • Support for React Native: code completion, running and debugging apps in WebStorm
  • Better TypeScript support: more precise code completion and analysis powered by the TypeScript language
    service; smarter Rename refactoring that understands the inheritance hierarchy
  • Set of inspections and quick-fixes for migrating the code to ES6 and a new
    Convert to class intention

Among other noticeable updates: integration with Stylelint, support for PostCSS via a plugin, running and debugging tests with Protractor, quick bootstrap to run and debug Node.js app in Docker, better support for ES6 destructuring, and even more!

40off2xIf you have a WebStorm license purchased before November 2015, before January 1, 2017 you can purchase a new subscription at 40% off and keep using WebStorm with all the latest features.

JetBrains WebStorm Team

WebStorm 2017.1 Early Access Preview

$
0
0

Today we start the Early Access Preview for WebStorm 2017.1 (EAP). Download WebStorm 2017.1 EAP, build 171.1834.8, here and install it side by side with your current stable WebStorm. No active subscription is required.

Since we released WebStorm 2016.3 a month ago, we’ve mostly focused on fixes, but also managed to add some new features in WebStorm 2017.1 EAP. Many more are coming after the holiday season. Stay tuned!

Better testing experience

Now it’s even easier to run Mocha tests with the new Run icon on the gutter. Click on an icon next to the test or the suit name and select Run or Debug.

run-test-with-an-icon

Once you’ve run the tests, the icon will show their status – green circles for passed tests, red for failed ones. The run and debug actions will be still available on a click.

You can also re-run tests automatically on changes. To do so, click the Toggle auto-test icon on the left-hand side of the test tool window. You will see how their status changes in the editor, even if you have previously hidden the tool window. This will work both for Mocha and Karma.

auto-test

Don’t forget that you can also run Mocha tests with a shortcut: place the caret on a test or a suit name and press Ctrl-Shift-R on macOS or Ctrl+Shift+F10 on Windows & Linux.

The new Go to test action (Shift-Cmd-T on macOS or Ctrl+Shift+T on Windows & Linux) lets you quickly navigate from a file to a related test file that follows popular naming conventions, e.g. has a .test., .spec. or _spec. suffix and is located either next to a file or in a test folder.

Integration with the Angular language service

WebStorm adds integration with the Angular language service, developed by the Angular team to improve code analysis and completion for Angular-TypeScript projects.

To enable the service, first, run the following in your project root:

npm install @angular/language-service --save-dev

Important: Due to some limitations of the service, please use it with Angular 2.3.1 or higher and with TypeScript 2.0.10.

WebStorm will start the service together with the TypeScript service. You’ll see all the errors and warnings in your TypeScript and HTML files not only in the editor, but also in the TypeScript tool window.

angular-service

WebStorm will also add the results provided by the Angular service to code completion, wherever possible. All refactorings are powered by WebStorm.

Faster start with linters

WebStorm has integration with many popular linting tools that allows you to see the errors and warnings from these linters right in the editor.

Now when you open a new project that uses ESLint, TSLint, JSCS, or Stylelint (has it listed in package.json or has a related config file), error highlighting will be enabled automatically. You can always disable that (or enable for your existing project) in Preferences – just search for the name of the linter to get to the right configuration page.

Other noticeable features include:

  • Support for emoji in the editor (rendered as color images on macOS and as monochrome characters on Windows and Linux)
  • Zero-latency typing is now enabled by default
  • Support for do expressions ECMAScript proposal
  • WebStorm for Windows now comes with a bundled 64 bit JKD

The full list of issues addressed in this EAP build can be found on our issue tracker.

Please report your feedback to our issue tracker. To get notifications of new EAP builds as they become available, subscribe to the EAP channel in Preferences | Appearance & Behavior | System Settings | Updates.

– JetBrains WebStorm Team

Live webinar: Using WebStorm for Building Angular Apps

$
0
0

Join us Monday, February, 6th 2017, 15:00 – 16:00 GMT / 10:00 AM – 11:00 AM EDT (New York) (check other time zones) for our free webinar Using WebStorm for Building Angular Apps, featuring Victor Savkin.

Register now!

In this webinar, Victor Savkin, a long time WebStorm user and Angular core contributor, walks you through his IDE setup and some of the things he uses to build Angular applications and the Angular framework itself. Victor will show how to start a new Angular app and will share some tips on working with large codebases, including refactorings and navigation.

The recording will be available after the webinar.

using_webstorm_for_building_angular_apps

About the presenter
Victor Savkin is an Angular core contributor and co-founder of Narwhal Technologies, where he provides Angular consulting to large teams who want to get their applications to production quickly. Victor toys with eclectic programming technologies and obsesses over fonts and keyboard layouts.

Webinar recording: Using WebStorm for Building Angular Apps

$
0
0

The recording of our February 6th webinar featuring Victor Savkin, Using WebStorm for Building Angular Apps, is now available on the JetBrains YouTube channel!

In this webinar, Victor Savkin, a long time WebStorm user and Angular core contributor, walks you through his IDE setup and shares his tips on using the IDE efficiently when working on Angular apps and on big projects like the Angular framework itself.

You can find out more about Victor and his company at http://nrwl.io. You can also follow him on twitter – @victorsavkin.

Here are some questions from the webinar Q&A session:

Q: Is Angular and TypeScript support available in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Professional and RubyMine?

A: Yes, all WebStorm features are available in these IDEs. Make sure you have AngularJS plugin installed in Preferences | Plugins.

Q: Where can I download WebStorm 2017.1 Early access preview? What new Angular features does it have?

A: You can download WebStorm 2017.1 EAP here and install it side-by-side with the stable version. WebStorm 2017.1 brings integration with Angular language service. You can find more information about it in this blog post.

Q: How can we format the imports to use space inside curly brackets and also use single quotes instead of two?

A: You can configure that in Preferences | Editor | Code style | TypeScript – Spaces – ES6 imports and Other – Quotes style.

Q: How to enable TSLint? Is it possible to see all TSLint errors?

A: You can enable TSLint in Preferences | Languages & Frameworks | TypeScript | TSLint. You will see errors from TSLint in the editor. To lint all files in the project select Run inspection by name in the Code menu and type TSLint. You’ll see the results in a new tool window. Please note that these results won’t be updated automatically as you make changes in the project.

Plugins Victor mentioned (to install a plugin go to Preferences | Plugins – Browse repositories and search for the plugin name):

And a long list of shortcuts that Victor uses (you can also print out the default WebStorm keymap reference):

General  (macOS (Windows and Linux), shortcuts for the default keymaps) 
Find action – Cmd-Shift-A (Ctrl-Shift-A)
Show Terminal – Alt-F12
Hide all windows – Shift-Cmd-F12 (Shift-Ctrl-F12)
Search everything – Shift-Shift
Show bookmarks – Cmd-F3 (Shift-F11)
Toggle Bookmark with Mnemonic – Alt-F3

Navigation
Recent files – Cmd-E (Ctrl-E)
Recently edited files – Shift-Cmd-E (Shift-Ctrl-E)
Navigate – Declaration – Cmd-Click/Cmd-D (Ctrl – B)
Navigate – File – Shift-Cmd-O (Shift-Ctrl-N)
Navigate – File structure – Cmd-F12 (Ctrl-F12)
Navigate – Select in – Alt-F1
Navigate – Back – Cmd-[ (Ctrl-Alt-Left)
Show Usages – Alt-Cmd-F7 (Ctrl-Alt-F7)
Highlight usages in file – Shift-Cmd-F7

Editing
Insert Live Template – Cmd-J (Ctrl-J)
Tab to jump to edit locations in Live Template
Quick Definition – Alt-Space (Shift-Ctrl-I)
Optimize imports – Ctrl-Alt-O

Refactoring
Extract – Variable – Alt-Cmd-V (Ctrl-Alt-V)
Extract – Method – Alt-Cmd-M (Ctrl-Alt-M)
Inline Method – Alt-Cmd-N (Ctrl-Alt-N)

Your WebStorm Team

Viewing all 79 articles
Browse latest View live