Skip to content

Commit 5721e9b

Browse files
authored
Merge pull request #164 from JeroenBoersma/master
Updated docs for devmode
2 parents 21d1e2a + 382f38a commit 5721e9b

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,20 @@ Multiple deploys will not add additional lines to your `.gitignore`, they will o
167167

168168
Documentation available [here](doc/Autoloading.md).
169169

170+
### Overwriting a production setting (DevMode)
171+
172+
```json
173+
{
174+
"extra":{
175+
"magento-deploystrategy": "copy",
176+
"magento-deploystrategy-dev": "symlink"
177+
}
178+
}
179+
```
180+
181+
Example in [devmode doc](doc/DevMode.md).
182+
183+
170184
### Include your project in deployment
171185

172186
When the magento-composer-installer is run, it only looks for magento-modules among your project's dependencies. Thus, if

doc/ConfigurationParameters.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Configuration parameters
2+
3+
In the `extra` section of a `composer.json` file you can add some extra configuration parameters.
4+
Here a overview of all available parameters.
5+
6+
## Project
7+
8+
- magento-root-dir : `"../relative/path"` [README - root dir](../README.md#install-a-module-in-your-project)
9+
- magento-project : `{"libraryPath": "../relative/path", "libraries": {"vendor/package": "../relative/path", ...}}`
10+
- with-bootstrap-patch : `true|false` [Autoloading](Autoloading.md)
11+
- magento-map-overwrite : `{"vendor/package": {"virtual/path/file.php": "real/path/file.php", ...}, ...}` [Mapping](Mapping.md)
12+
- package-xml : `"path/to/package.xml"` [Mapping Package XML](Mapping.md#mapping-with-packagexml)
13+
14+
## Deploy
15+
16+
- magento-deploystrategy : `"copy|symlink|absoluteSymlink|link|none"` [Deploy strategy](Deploy.md)
17+
- magento-deploystrategy-overwrite : `{"vendor/package": "copy|symlink|absoluteSymlink|link|none", ...}` [Deploy overwrite](Deploy.md#overwrite-deploy-method-per-module)
18+
- magento-deploy-sort-priority : `{"vendor/package": 200, ...}` (Deploy sort priority)[Deploy.md#define-order-in-which-you-want-your-magento-packages-deployed]
19+
- magento-deploy-ignore : `{"vendor/package": ["file/to/exclude.php"], ...}` [Deploy ignore files](Deploy.md#prevent-single-files-from-deploy)
20+
- magento-force : `true|false` [Deploy force overwrite](Deploy.md#define-order-in-which-you-want-your-magento-packages-deployed)
21+
- path-mapping-translations : `["old/path/file.txt": "path/new/file.txt"]`
22+
23+
## Developer
24+
25+
- skip-suggest-repositories : `true|false` [FAQ - Disable suggestions](FAQ.md#can-i-disable-repository-suggestions)
26+
- auto-append-gitignore : `true|false` [README - gitignore](../README.md#auto-add-files-to-gitignore)
27+
- include-root-package : `true|false` [README - root pacakge](../README.md#include-your-project-in-deployment)
28+
- *-dev : `` [Deveveloper Mode](DevMode.md)

doc/DevMode.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dev mode
2+
3+
Composer supports two modes `--dev` (default) and `--no-dev` (production).
4+
Overwrite any `extra.*` parameter by adding `-dev` to it.
5+
6+
In dev mode any extra `-dev` variant will overwrite the original.
7+
8+
The next example:
9+
- will use copy strategy on production and symlink locally
10+
- will only append to .gitignore on dev machines
11+
- will only force on production
12+
13+
```json
14+
{
15+
"extra":{
16+
"magento-root-dir": "htdocs/",
17+
18+
"magento-deploystrategy": "copy",
19+
"magento-deploystrategy-dev": "symlink",
20+
21+
"auto-append-gitignore-dev": true,
22+
23+
"magento-force": true,
24+
"magento-force-dev": false
25+
}
26+
}
27+
```
28+
29+
In production run `composer install --no-dev` and all `*-dev` will be ignored.

0 commit comments

Comments
 (0)