├── AMD.xml ├── Console.xml ├── Mocha test framework.xml ├── Timers.xml ├── README.md ├── ExtJs.xml └── JS.xml /AMD.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Console.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Mocha test framework.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Timers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #WebStorm Live Template 2 | 3 | ###How to instal 4 | 5 | For installing templates, you need, just copy all XML files to matching folder and restart WebStopm (PHPStorm) 6 | 7 | - Windows: [your home directory]\.[product name][version number]\config\templates 8 | 9 | Example: `C:\Users\Windows-User\.WebStorm6\config\templates\` 10 | 11 | - Linux: ~\.[product name][version number]\config\templates 12 | - MacOS: ~/Library/Preferences/[product name][version number]/templates 13 | 14 | ---------- 15 | 16 | ## AMD 17 | + `define` - new full AMD module with name, dependensies and implementation. A directive `/*global define:true*/` added for telling JSHint/JSLint about global variables. 18 | 19 | ```javascript 20 | /*global define:true*/ 21 | define('$MODULENAME$', [], function () { 22 | 'use strict'; 23 | $END$ 24 | return {}; 25 | }); 26 | ``` 27 | ## Console 28 | 29 | + `dir` - Console dir() method 30 | 31 | ```javascript 32 | console.dir($PARAM$) 33 | ``` 34 | 35 | + `log` - Console log() method 36 | 37 | ```javascript 38 | console.log($PARAM$) 39 | ``` 40 | 41 | ## JS (Java Script construction) 42 | 43 | + `?` - Conditional operator that assigns a value to a variable based on some condition 44 | 45 | ```javascript 46 | $VAR$=($CONDITION$)?$VAL1$:$VAL2$ 47 | ``` 48 | 49 | + `do` - Loop 'do-while' execute the code block once, before checking if the condition. 50 | 51 | ```javascript 52 | do { 53 | $END$ 54 | } while ($CONDITION$); 55 | ``` 56 | 57 | + `for` - Loop 'for' with index 58 | 59 | ```javascript 60 | len = $ARRAY$.length; 61 | for ($INDEX$ = 0; $INDEX$ 2 | 3 | 25 | 47 | 69 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /JS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 45 | 67 | 90 | 113 | 134 | 155 | 176 | 196 | 219 | 243 | 249 | 250 | 251 | --------------------------------------------------------------------------------