C.49 PhkPackageTask
Prev | Appendix C. Optional tasks | Next

## C.49 PhkPackageTask

This task runs PHK_Creator.phk to build PHK-package. Learn more about build process in PHK Builder's Guide.

Table C.66: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`phkcreatorpath` | `String` | Path to PHK_Creator.phk. | n/a | Yes
`inputdirectory` | `String` | Path to directory, that will be packed. | n/a | Yes
`outputfile` | `String` | Output PHK-file. Directory, where file will be stored, must exist! | n/a | Yes
`compress` | `String` | Compression type (gzip, bzip2, none) to apply to the packed files. | none | No
`strip` | `Boolean` | When true, PHP source file(s) are stripped (filtered through php_strip_whitespace()) before being stored into the archive. | `false` | No
`name` | `String` | The package's name (Information only). | n/a | No
`webrunscript` | `String` | The script to run in web direct access mode. Subfile path. | n/a | No
`crccheck` | `Boolean` | If true, a CRC check will be forced every time the package is mounted. | `false` | No

### C.49.1 Example

Sample build command:

    <phkpackage
        phkcreatorpath="/path/to/PHK_Creator.phk"
        inputdirectory="src"
        outputfile="build/sample-project.phk"
        compress="gzip"
        strip="true"
        name="Sample Project"
        webrunscript="index.php">
        <webaccess>
            <paentry>/</paentry>
        </webaccess>
    </phkpackage>

### C.49.2 Supported Nested Tags

- `webaccess`

  Collection of `path` tags (see example below), that will be visible outside package in web mode.

Prev | Up | Next
C.48 PharPackageTask | Home | C.50 PhpCodeSnifferTask