Commit 31890936 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Don't output original guides/videos/examples JSON files.

There needs to be a separate mechanism for giving people access to
all the assets used in documentation.  The previous approach of
writing out guides/videos/examples JSON files generated needless
files for most users of the docs, while not really helping the
people who wanted the actual source files of the docs, as these
files weren't really the actual source files, only gone-through-jsduck
versions of only some of them.
parent 09e282e0
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -35,13 +35,11 @@ module JsDuck
    end

    # Writes out the assets that can be written out separately:
    # guides, videos, examples, images.
    # guides, images.
    #
    # Welcome page and categories are written in JsDuck::IndexHtml
    def write
      @guides.write(@opts.output_dir+"/guides")
      @videos.write(@opts.output_dir+"/videos")
      @examples.write(@opts.output_dir+"/examples")
      @images.copy(@opts.output_dir+"/images")
    end

+0 −8
Original line number Diff line number Diff line
@@ -48,14 +48,6 @@ module JsDuck
      end
    end

    # Writes examples JSON file to dir
    def write(dir)
      FileUtils.mkdir(dir) unless File.exists?(dir)
      # Write the JSON to output dir, so it's available in released
      # version of docs and people can use it with JSDuck by themselves.
      JsonDuck.write_json(dir+"/examples.json", @groups)
    end

    # Extracts example icon URL from example hash
    def icon_url(example)
      @opts.examples_base_url + example["icon"]
+0 −3
Original line number Diff line number Diff line
@@ -31,9 +31,6 @@ module JsDuck
    def write(dir)
      FileUtils.mkdir(dir) unless File.exists?(dir)
      each_item {|guide| write_guide(guide, dir) }
      # Write the JSON to output dir, so it's available in released
      # version of docs and people can use it with JSDuck by themselves.
      JsonDuck.write_json(dir+"/guides.json", @groups)
    end

    def write_guide(guide, dir)
+0 −8
Original line number Diff line number Diff line
@@ -30,14 +30,6 @@ module JsDuck
      end
    end

    # Writes videos JSON file to a dir
    def write(dir)
      FileUtils.mkdir(dir) unless File.exists?(dir)
      # Write the JSON to output dir, so it's available in released
      # version of docs and people can use it with JSDuck by themselves.
      JsonDuck.write_json(dir+"/videos.json", @groups)
    end

    # Extracts video icon URL from video hash
    def icon_url(video)
      video["thumb"]