Skip to content

Commit

Permalink
Add doc for Use the Ignore Files Manager in the Composer scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
francoispluchino committed Oct 7, 2014
1 parent a8d56e3 commit 4204fe5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ This allows you to manage asset dependencies in a PHP based project very easily.
- For Bower, all files defined in the section `ignore` will not be installed
- Disable or replace the deleting of the ignore files for Bower
- Enable manually the deleting of the ignore files for NPM
- Use the Ignore Files Manager in the Composer scripts
- Compatible with commands:
- `search` (bower only)
- `show`
Expand Down
31 changes: 31 additions & 0 deletions Resources/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,37 @@ delete the files:
}
```

### Use the Ignore Files Manager in the Composer scripts

Sometimes you need to clean a package that is not considered an NPM/Bower Asset
Package. To do this, you can use the script helper
`Fxp\Composer\AssetPlugin\Composer\ScriptHandler::deleteIgnoredFiles` for the
`post-package-install` or `post-package-update` script events.

**Example:**

```json
{
"scripts": {
"post-package-install": [
"Fxp\\Composer\\AssetPlugin\\Composer\\ScriptHandler::deleteIgnoredFiles"
],
"post-package-update": [
"Fxp\\Composer\\AssetPlugin\\Composer\\ScriptHandler::deleteIgnoredFiles"
]
},
"extra": {
"asset-ignore-files": {
"acme/other-asset": [
".*",
"*.md",
"test"
]
}
}
}
```

### Disable the search for an asset registry

If you want to disable the search for an asset registry, you can add an extra
Expand Down

0 comments on commit 4204fe5

Please sign in to comment.