Procházet zdrojové kódy

respect interactive config for tryitoutjs

David Adi Nugroho před 4 roky
rodič
revize
cc91233ef5
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      src/Writing/Writer.php

+ 4 - 1
src/Writing/Writer.php

@@ -289,8 +289,11 @@ class Writer
         ConsoleOutputUtils::info('Transforming Markdown docs to HTML...');
 
         $this->pastel->generate($this->sourceOutputPath . '/index.md', $this->staticTypeOutputPath);
+
         // Add our custom JS
-        copy(__DIR__.'/../../resources/js/tryitout.js', $this->staticTypeOutputPath . '/js/tryitout-'.Globals::SCRIBE_VERSION.'.js');
+        if (config('scribe.interactive')) {
+            copy(__DIR__.'/../../resources/js/tryitout.js', $this->staticTypeOutputPath . '/js/tryitout-'.Globals::SCRIBE_VERSION.'.js');
+        }
 
         if (!$this->isStatic) {
             $this->performFinalTasksForLaravelType();