Przeglądaj źródła

Rename rebuild command to update

shalvah 5 lat temu
rodzic
commit
0dd2d387c7

+ 2 - 2
docs/generating-documentation.md

@@ -25,10 +25,10 @@ If you want to modify the content of your generated documentation without changi
 
 This file is located in the `source` folder of  your `output` directory (see [configuration](config.html#output)), so by default, this is `public/docs/source/index.md`.
  
-After editing the markdown file, you can use the `apidoc:rebuild` command to rebuild your documentation into HTML.
+After editing the markdown file, you can use the `scribe:update` command to rebuild your documentation into HTML.
 
 ```sh
-php artisan apidoc:rebuild
+php artisan scribe:update
 ```
 
 ## Automatically add markdown to the beginning or end of the documentation

+ 2 - 2
src/ApiDocGeneratorServiceProvider.php

@@ -4,7 +4,7 @@ namespace Mpociot\ApiDoc;
 
 use Illuminate\Support\ServiceProvider;
 use Mpociot\ApiDoc\Commands\GenerateDocumentation;
-use Mpociot\ApiDoc\Commands\RebuildDocumentation;
+use Mpociot\ApiDoc\Commands\UpdateDocumentation;
 use Mpociot\ApiDoc\Matching\RouteMatcher;
 use Mpociot\ApiDoc\Matching\RouteMatcherInterface;
 
@@ -34,7 +34,7 @@ class ApiDocGeneratorServiceProvider extends ServiceProvider
         if ($this->app->runningInConsole()) {
             $this->commands([
                 GenerateDocumentation::class,
-                RebuildDocumentation::class,
+                UpdateDocumentation::class,
             ]);
         }
 

+ 9 - 3
src/Commands/RebuildDocumentation.php → src/Commands/UpdateDocumentation.php

@@ -8,17 +8,23 @@ use Mpociot\ApiDoc\Tools\Flags;
 use Mpociot\ApiDoc\Writing\Writer;
 use Shalvah\Clara\Clara;
 
-class RebuildDocumentation extends Command
+class UpdateDocumentation extends Command
 {
-    protected $signature = 'apidoc:rebuild';
+    protected $signature = 'scribe:update';
 
-    protected $description = 'Rebuild your API documentation from your markdown file.';
+    protected $description = 'Update your API documentation with changes made to your markdown files.';
 
     /**
      * @var Clara
      */
     private $clara;
 
+    public function __construct()
+    {
+        parent::__construct();
+        $this->setAliases(['scribe:rebuild']);
+    }
+
     public function handle()
     {
         Flags::$shouldBeVerbose = $this->option('verbose');