PHPackages                             dubpub/publisher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dubpub/publisher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dubpub/publisher
================

Publisher for assets/configs

1.1.1(10y ago)063PHP

Since Nov 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/dubpub/publisher)[ Packagist](https://packagist.org/packages/dubpub/publisher)[ RSS](/packages/dubpub-publisher/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (4)Used By (0)

\#.publisher

> Package for publishing or linking files from composer's dependencies.

[![Latest Stable Version](https://camo.githubusercontent.com/d99828978c207297178748e0db8687f872ea905871c47f00de49a773d9ea979e/68747470733a2f2f706f7365722e707567782e6f72672f6475627075622f7075626c69736865722f762f737461626c65)](https://packagist.org/packages/dubpub/publisher)[![Total Downloads](https://camo.githubusercontent.com/63a9b5fc61be90893460095c971112737a6e1d5a1b424d75d94db84944f66f4a/68747470733a2f2f706f7365722e707567782e6f72672f6475627075622f7075626c69736865722f646f776e6c6f616473)](https://packagist.org/packages/dubpub/publisher)[![Latest Unstable Version](https://camo.githubusercontent.com/9d10b867f4275a8542380bb86eee88c5bfac149bcfd56f29352a611cbb3bd066/68747470733a2f2f706f7365722e707567782e6f72672f6475627075622f7075626c69736865722f762f756e737461626c65)](https://packagist.org/packages/dubpub/publisher)[![Build Status](https://camo.githubusercontent.com/e819dfde99154bd9913c309879616746c420f079cc689d627b4919adae29bc2b/68747470733a2f2f7472617669732d63692e6f72672f6475627075622f7075626c69736865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dubpub/publisher)[![Coverage Status](https://camo.githubusercontent.com/4401b0d8294193d2dcd70adfb7e9b3b0b70c8ef288f0695dcb253e6e7bea1580/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6475627075622f7075626c69736865722f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/dubpub/publisher?branch=master)[![Code Climate](https://camo.githubusercontent.com/63949d2d34c920cac29c541b100971d74053366e526eb4bebf051769a16c9e02/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6475627075622f7075626c69736865722f6261646765732f6770612e737667)](https://codeclimate.com/github/dubpub/publisher)

- [Install](#install)
- [Supported schemas and syntax](#schemas-and-syntax)
    - [PHP example](#php-example)
    - [JSON example](#json-example)
    - [INI example](#ini-example)
    - [YML,YAML example](#ymlyaml-example)
- [Usage in package](#usage-in-package)
- [Usage in project](#usage-in-project)
- [Extending format support](#extending)

\##Install

**.publisher** can be installed from composer:

```
{
    "require": {
        "dubpub/publisher": "1.*"
    }
}
```

Once **.publisher** is installed, it's executable is available from `vendor/bin` folder, simply run command to check the installation:

```
$> vendor/bin/publisher
```

\##Schemas and syntax

By default publisher supports following formats: \*.php, \*.json, \*.yaml, \*.yml. Schema must consists of 3 levels - package names, which contains group names, which contains file notations.

- package name
    - file group name
        - file notation

File notation examples:

   Notation Description     `assets`  Will copy `assets/` folder, from package's directory and copy it into configured publish folder.   `assets/styles.css`  Will copy `assets/styles.css`, that's located on package's folder and publish it into configured publish folder.    `assets/ -> public/`  Will copy `assets/` folder, from package's directory and copy it into `public/` directory configured publish folder.    `assets -> {public,web}/`  Will look up for `public/` or `web/` path. If neither are available, first from the list will be created. And `assets/` folder, from package's directory will be copied into resulting directory.    `assets/styles/* -> {public,web}/css/`  Will look up for `public/`" or `web/` path. If neither are available, first from the list will be created. And all files from folder `assets/styles/` of package's directory will be copied into `{resulting directory}/css/`.    `@path/to/my/link`  Will create link of package's `path/to/my/link` and place it in configured publish path.    `@path/to/my/* -> bin/`  Will create links of package's every file from `path/to/my/` folder and place it in `bin/` of configured publish path.   \####PHP example

```
