diff --git a/.gitignore b/.gitignore index 8b7ef350..3784eb09 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,8 @@ +### Docs ### +build/ +cache/ + +### PHP ### + /vendor composer.lock diff --git a/composer.json b/composer.json index acca146a..dad0392f 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "phpunit/phpunit": "~4.0", "mockery/mockery": "~0.9", "illuminate/database": "~4.0", - "symfony/process": "~2.3" + "symfony/process": "~2.3", + "sami/sami": "2.0.*" }, "suggest": { "zizaco/confide":"Confide is an authentication solution for Laravel 4 that couples very well with Entrust" diff --git a/docs.php b/docs.php new file mode 100644 index 00000000..6e398dae --- /dev/null +++ b/docs.php @@ -0,0 +1,24 @@ +files() + ->name('*.php') + ->in($dir = __DIR__ . '/src'); + +$versions = GitVersionCollection::create($dir) + ->add('master', 'master branch') + ->addFromTags('2.*'); + +$options = array( + 'versions' => $versions, + 'title' => 'Entrust API', + 'build_dir' => __DIR__ . '/build/docs/%version%', + 'cache_dir' => __DIR__ . '/build/cache/docs/%version%', + 'default_opened_level' => 2, +); + +return new Sami($iterator, $options);