-
Notifications
You must be signed in to change notification settings - Fork 0
/
doctum.php
38 lines (30 loc) · 871 Bytes
/
doctum.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require __DIR__.'/vendor/autoload.php';
use Doctum\Doctum;
use Doctum\RemoteRepository\GitHubRemoteRepository;
use Doctum\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;
$dir = __DIR__.'/src';
$iterator = Finder::create()
->files()
->name('*.php')
->exclude('tests')
->exclude('vendor')
->in($dir);
$versions = GitVersionCollection::create($dir)
->add('master', 'Master branch');
$repo = new GitHubRemoteRepository(
'mtvbrianking/laravel-package-boilerplate',
dirname($dir),
'https://github.com/'
);
$options = [
'theme' => 'default',
'versions' => $versions,
'title' => 'Laravel Package Boilerplate',
'build_dir' => __DIR__.'/docs',
'cache_dir' => __DIR__.'/docs/cache',
'remote_repository' => $repo,
'default_opened_level' => 3,
];
return new Doctum($iterator, $options);