├── .editorconfig ├── .gitignore ├── CONTRIBUTE.md ├── IntelliJ IDEA Global Settings ├── LICENSE ├── README.md ├── package.json ├── settings.jar ├── templates └── ReactJS.xml └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### JetBrains 2 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 3 | .idea 4 | 5 | ### Node 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | 12 | # Dependency directories 13 | node_modules/ 14 | 15 | # Typescript v1 declaration files 16 | typings/ 17 | -------------------------------------------------------------------------------- /CONTRIBUTE.md: -------------------------------------------------------------------------------- 1 | # Prepare environment 2 | Please install [Editor config](https://editorconfig.org) and respect `.editorconfig` settings 3 | 1. Install [Node](https://nodejs.org/en/download/) 4 | 1. Install [Yarn](https://yarnpkg.com/en/docs/install) 5 | 1. Run `yarn` 6 | 1. Edit `templates/ReactJS.xml` 7 | 1. Build new `settings.jar` file by running `yarn run build` 8 | 1. Commit changes 9 | -------------------------------------------------------------------------------- /IntelliJ IDEA Global Settings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geochatz/phpstorm-reactjs/03beb74b01517064254ffeea9be14c18f26ef2ea/IntelliJ IDEA Global Settings -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # phpstorm-reactjs 2 | ReactJS Live templates for PHPStorm 3 | 4 | ### How to: 5 | 6 | 1. Download [settings.jar](https://github.com/geochatz/phpstorm-reactjs/raw/master/settings.jar) file 7 | 1. Click `File` -> `Importing Settings...` on your IDE menu, select `settings.jar`, then click `OK`. 8 | 9 | #### Manually insert template file 10 | 1. [Download](https://github.com/geochatz/phpstorm-reactjs/raw/master/template/ReactJS.xml) and copy the *xml* file(s) to your templates folder: 11 | 12 | * Windows: `\.\config\templates` 13 | * Linux: `~\.\config\templates` 14 | * OS X: `~/Library/Preferences//templates` 15 | 16 | e.g. `~/Library/Preferences/WebIde80/templates` on OS X for PhpStorm 8 17 | 18 | 1. Restart PhpStorm. 19 | 20 | 1. To see all templates, go to *Preferences->Live Templates* and expand the Template Group. 21 | 22 | It's hard to remember shortcuts when there are a large number of options. A more efficient way is to take advantage of PhpStorm's *Insert Live Template* shortcut. Press `Cmd + J` and type as many letters as you want to filter the resulates. 23 | 24 | For example, to create a new ReactJS class, type `rcc` and press Tab or press `Cmd + J` and write `rcc` or `React` 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpstorm-reactjs", 3 | "version": "0.0.1", 4 | "description": "ReactJS Live templates for PHPStorm", 5 | "main": "index.js", 6 | "repository": "https://github.com/geochatz/phpstorm-reactjs.git", 7 | "author": "geochatz", 8 | "license": "unlicensed", 9 | "scripts": { 10 | "build": "nodezip -c settings.jar templates/ReactJS.xml \"IntelliJ IDEA Global Settings\"" 11 | }, 12 | "devDependencies": { 13 | "node-zip": "^1.1.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /settings.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geochatz/phpstorm-reactjs/03beb74b01517064254ffeea9be14c18f26ef2ea/settings.jar -------------------------------------------------------------------------------- /templates/ReactJS.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 31 | 46 | 61 | 75 | 89 | 102 | 115 | 129 | 143 | 156 | 169 | 182 | 195 | 208 | 221 | 234 | 247 | 260 | 273 | 286 | 299 | 312 | 326 | 339 | 352 | 365 | 378 | 391 | 405 | 419 | 432 | 445 | 458 | 472 | 486 | 499 | 512 | 525 | 538 | 551 | 565 | 578 | 592 | 606 | 619 | 633 | 647 | 660 | 674 | 688 | 702 | 716 | 730 | 743 | 756 | 769 | 782 | 795 | 808 | 821 | 834 | 847 | 860 | 873 | 886 | 899 | 912 | 925 | 938 | 951 | 964 | 977 | 990 | 1003 | 1016 | 1029 | 1042 | 1055 | 1068 | 1081 | 1094 | 1107 | 1120 | 1133 | 1146 | 1159 | 1172 | 1185 | 1198 | 1211 | 1224 | 1237 | 1250 | 1263 | 1276 | 1289 | 1302 | 1315 | 1328 | 1341 | 1354 | 1367 | 1380 | 1393 | 1406 | 1419 | 1432 | 1445 | 1458 | 1471 | 1484 | 1497 | 1510 | 1523 | 1536 | 1549 | 1562 | 1575 | 1588 | 1601 | 1614 | 1627 | 1640 | 1653 | 1666 | 1679 | 1692 | 1693 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | jszip@2.5.0: 6 | version "2.5.0" 7 | resolved "https://registry.yarnpkg.com/jszip/-/jszip-2.5.0.tgz#7444fd8551ddf3e5da7198fea0c91bc8308cc274" 8 | dependencies: 9 | pako "~0.2.5" 10 | 11 | node-zip@^1.1.1: 12 | version "1.1.1" 13 | resolved "https://registry.yarnpkg.com/node-zip/-/node-zip-1.1.1.tgz#94d1ad674a3cd46a1588dd736f4a9a78c757eb62" 14 | dependencies: 15 | jszip "2.5.0" 16 | 17 | pako@~0.2.5: 18 | version "0.2.9" 19 | resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" 20 | --------------------------------------------------------------------------------