View on GitHub

JS Toolbox

An Intellij / Webstorm plugin that provides several tools for javascript development

Download this project as a .zip file Download this project as a tar.gz file

Simplify your daily javascript development with the JS Toolbox plugin. More actions coming soon.

Download the source code: https://github.com/andresdominguez/jsToolbox

Here is a list of available actions:

See all the JS Toolbox actions from two locations:

Go to test [Alt T], [Ctrl Command T] on a Mac

Jump between a javascript file and its unit test. You can configure the file name patterns under:

Settings > JS Toolbox

And set values for Unit test suffix and File suffix

If you need multiple patterns use comma. For example:

Unit test suffix: Spec.js,-spec.js File suffix: -controller.js,.js

With this configuration the action will take you from:

my-component.js or my-component-controller.js

to

my-componentSpec.js or my-component-spec.js

Go to view [Alt V], [Ctrl Command V] on a Mac

Jump between a javascript file and its associated view. You can configure the file name patterns under:

Settings > JS Toolbox

And set values for View suffix and File suffix

If you need multiple patterns use comma. For example:

File suffix: -controller.js,.js View suffix: -view.html,.html

With this configuration the action will take you from:

my-component.js or my-component-controller.js

to

my-component.html or my-component-view.html

Go to constructor [Alt G], [Ctrl Command G] on a mac

Jump to the constructor of the current javascript file.

Join multi-line strings and variable declarations [Ctrl SHIFT Alt J], [Ctrl Command J] on a Mac

Join strings and variable declarations

Turn a multi-line string into a single string. Press Ctrl SHIFT Alt J on any of the string lines or select a block of text and join.

var s = 'one ' +
    'two ' +
    'three';

Into a single string:

var s = 'one two three';

Join multiple vars into a single var:

var foo = 1;
var bar = 2;

Into a single var declaration:

var foo = 1,
    bar = 2;

Open current file in browser [Ctrl SHIFT Alt G], [SHIFT Option Command G] on a Mac

Open the current file in the browser. Configure the URL that you want to use when opening the browser under Settings > JS Toolbox.

Generate a method for the current javascript class (Under generate menu)

Add a new method to the current javascript class.

You need to use the @constructor annotation to mark the constructor of the class.

Override a method from the parent javascript class (Under generate menu)

Override a parent method in the current javascript class.

You need to annotate the classes with the @constructor and @extends annotations, otherwise the plugin cannot find the class hierarchy.