Ver Fonte

Added new dev-urn-catalog-generate helper script to auto generate URN XML paths for PHPStorm's local development

Mark Shust há 7 anos atrás
pai
commit
9447bb1473
2 ficheiros alterados com 10 adições e 0 exclusões
  1. 1 0
      README.md
  2. 9 0
      compose/magento-2/bin/dev-urn-catalog-generate

+ 1 - 0
README.md

@@ -109,6 +109,7 @@ See the `compose` folder for sample setups for both Magento 1 and Magento 2. Bas
 ## Custom CLI Commands
 
 - `./bin/bash`: Drop into the bash prompt of your Docker container. The `phpfpm` container should be mainly used to access the filesystem within Docker.
+- `./bin/dev-urn-catalog-generate`: Generate URN's for PHPStorm and remap paths to local host. Restart PHPStorm after running this command.
 - `./bin/cli`: Run any CLI command without going into the bash prompt. Ex. `./bin/cli ls`
 - `./bin/composer`: Run the composer binary. Ex. `./bin/composer install`
 - `./bin/download`: Download a version of Magento to the `src` directory. Ex. `./bin/download 2.2.2`

+ 9 - 0
compose/magento-2/bin/dev-urn-catalog-generate

@@ -0,0 +1,9 @@
+#!/bin/bash
+./bin/magento dev:urn-catalog:generate misc.xml
+
+sed -i .bak 's?/var/www/html?'`pwd`/src'?' src/misc.xml
+rm src/misc.xml.bak
+mkdir -p .idea
+mv src/misc.xml .idea/misc.xml
+
+echo "URN's have been generated, you may now restart PHPStorm"