Added support for phar metadata
This commit is contained in:
@@ -83,6 +83,28 @@ You can follow the same approach when excluding files with the `exclude` block:
|
||||
The `dir` rules match against `*/<dirname>/*` while the `file` rule will match
|
||||
against `*/<filename>`.
|
||||
|
||||
## Metadata
|
||||
|
||||
As PHAR archives support metadata, you can insert your own custom data using
|
||||
the `metadata` block:
|
||||
|
||||
library; // build a library (plugin)
|
||||
metadata {
|
||||
plugin_type "myapp.plugin";
|
||||
plugin_name "myapp.plugin.awesomeplugin";
|
||||
plugin_version "1.0.0";
|
||||
}
|
||||
|
||||
You can also map props to metadata. The advantage to this is that you can scan
|
||||
the metadata before including the .phar letting you pick the most recent versions
|
||||
etc.
|
||||
|
||||
metadata {
|
||||
plugin_version prop="MYPLUGIN_VERSION";
|
||||
}
|
||||
|
||||
The order is important! Make sure you have defined the props you want to reference
|
||||
before referencing them!
|
||||
|
||||
## Props
|
||||
|
||||
@@ -142,6 +164,8 @@ If set, no minification will take place. Generally, the minification should not
|
||||
cause any problems but lead to a file that can be up to half a megabyte smaller
|
||||
as whitespace and comments are removed.
|
||||
|
||||
It is also possible to mark specific directories or files as verbatim on the
|
||||
`dir` and `file` tags in an `include` block.
|
||||
|
||||
### compress (bool)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user