https://github.com/ytake/hh-config-aggregator
Aggregate and merge configuration For Hack
https://github.com/ytake/hh-config-aggregator
config hack hacklang
Last synced: about 1 month ago
JSON representation
Aggregate and merge configuration For Hack
- Host: GitHub
- URL: https://github.com/ytake/hh-config-aggregator
- Owner: ytake
- License: mit
- Created: 2017-11-29T04:49:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T06:12:35.000Z (over 5 years ago)
- Last Synced: 2024-12-31T09:42:36.953Z (about 1 year ago)
- Topics: config, hack, hacklang
- Language: Hack
- Size: 52.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HH-Config-Aggregator
[](https://travis-ci.org/ytake/hh-config-aggregator)
Aggregates and merges configuration, Supports caching for fast bootstrap in production environments.
[zendframework/zend-config-aggregator](https://github.com/zendframework/zend-config-aggregator) converted for hack
## Installation
```bash
$ composer require ytake/hh-config-aggregator
```
## Usage
```hack
use type Ytake\HHConfigAggreagator\ArrayProvider;
use type Ytake\HHConfigAggreagator\ConfigAggreagator;
use type Ytake\HHConfigAggreagator\PhpFileProvider;
$aggregator = new ConfigAggreagator(
vec[
new PhpFileProvider(
__DIR__.'/resources/config/{{,*.}global,{,*.}local}.{hack,hackpartial}',
),
new ArrayProvider(['config_cache_enabled' => true])
],
__DIR__.'/resources/cached.config.cache.hackpartial'
);
$aggregator->getMergedConfig();
```