瀏覽代碼

Merge pull request #224 from lakuapik/patch-01

Respect interactive config for tryitoutjs
Shalvah 4 年之前
父節點
當前提交
afaa093289
共有 1 個文件被更改,包括 4 次插入1 次删除
  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();