Sfoglia il codice sorgente

respect interactive config for tryitoutjs

David Adi Nugroho 4 anni fa
parent
commit
cc91233ef5
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  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();