Skip to content

Commit

Permalink
Merge pull request #164 from JeroenBoersma/master
Browse files Browse the repository at this point in the history
Updated docs for devmode
  • Loading branch information
Flyingmana authored Jun 7, 2017
2 parents 21d1e2a + 382f38a commit 5721e9b
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,20 @@ Multiple deploys will not add additional lines to your `.gitignore`, they will o

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

### Overwriting a production setting (DevMode)

```json
{
"extra":{
"magento-deploystrategy": "copy",
"magento-deploystrategy-dev": "symlink"
}
}
```

Example in [devmode doc](doc/DevMode.md).


### Include your project in deployment

When the magento-composer-installer is run, it only looks for magento-modules among your project's dependencies. Thus, if
Expand Down
28 changes: 28 additions & 0 deletions doc/ConfigurationParameters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configuration parameters

In the `extra` section of a `composer.json` file you can add some extra configuration parameters.
Here a overview of all available parameters.

## Project

- magento-root-dir : `"../relative/path"` [README - root dir](../README.md#install-a-module-in-your-project)
- magento-project : `{"libraryPath": "../relative/path", "libraries": {"vendor/package": "../relative/path", ...}}`
- with-bootstrap-patch : `true|false` [Autoloading](Autoloading.md)
- magento-map-overwrite : `{"vendor/package": {"virtual/path/file.php": "real/path/file.php", ...}, ...}` [Mapping](Mapping.md)
- package-xml : `"path/to/package.xml"` [Mapping Package XML](Mapping.md#mapping-with-packagexml)

## Deploy

- magento-deploystrategy : `"copy|symlink|absoluteSymlink|link|none"` [Deploy strategy](Deploy.md)
- magento-deploystrategy-overwrite : `{"vendor/package": "copy|symlink|absoluteSymlink|link|none", ...}` [Deploy overwrite](Deploy.md#overwrite-deploy-method-per-module)
- magento-deploy-sort-priority : `{"vendor/package": 200, ...}` (Deploy sort priority)[Deploy.md#define-order-in-which-you-want-your-magento-packages-deployed]
- magento-deploy-ignore : `{"vendor/package": ["file/to/exclude.php"], ...}` [Deploy ignore files](Deploy.md#prevent-single-files-from-deploy)
- magento-force : `true|false` [Deploy force overwrite](Deploy.md#define-order-in-which-you-want-your-magento-packages-deployed)
- path-mapping-translations : `["old/path/file.txt": "path/new/file.txt"]`

## Developer

- skip-suggest-repositories : `true|false` [FAQ - Disable suggestions](FAQ.md#can-i-disable-repository-suggestions)
- auto-append-gitignore : `true|false` [README - gitignore](../README.md#auto-add-files-to-gitignore)
- include-root-package : `true|false` [README - root pacakge](../README.md#include-your-project-in-deployment)
- *-dev : `` [Deveveloper Mode](DevMode.md)
29 changes: 29 additions & 0 deletions doc/DevMode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dev mode

Composer supports two modes `--dev` (default) and `--no-dev` (production).
Overwrite any `extra.*` parameter by adding `-dev` to it.

In dev mode any extra `-dev` variant will overwrite the original.

The next example:
- will use copy strategy on production and symlink locally
- will only append to .gitignore on dev machines
- will only force on production

```json
{
"extra":{
"magento-root-dir": "htdocs/",

"magento-deploystrategy": "copy",
"magento-deploystrategy-dev": "symlink",

"auto-append-gitignore-dev": true,

"magento-force": true,
"magento-force-dev": false
}
}
```

In production run `composer install --no-dev` and all `*-dev` will be ignored.

0 comments on commit 5721e9b

Please sign in to comment.