From 318909364593ff60bc4694714e89e7005e3961fa Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Mon, 20 Feb 2012 16:04:51 +0200 Subject: [PATCH] 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. --- lib/jsduck/assets.rb | 4 +--- lib/jsduck/examples.rb | 8 -------- lib/jsduck/guides.rb | 3 --- lib/jsduck/videos.rb | 8 -------- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/jsduck/assets.rb b/lib/jsduck/assets.rb index 1f7229d5..f4c4bf13 100644 --- a/lib/jsduck/assets.rb +++ b/lib/jsduck/assets.rb @@ -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 diff --git a/lib/jsduck/examples.rb b/lib/jsduck/examples.rb index 19d7b5f2..fca2c813 100644 --- a/lib/jsduck/examples.rb +++ b/lib/jsduck/examples.rb @@ -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"] diff --git a/lib/jsduck/guides.rb b/lib/jsduck/guides.rb index c3500555..97c40a35 100644 --- a/lib/jsduck/guides.rb +++ b/lib/jsduck/guides.rb @@ -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) diff --git a/lib/jsduck/videos.rb b/lib/jsduck/videos.rb index 50ab6db9..41b56739 100644 --- a/lib/jsduck/videos.rb +++ b/lib/jsduck/videos.rb @@ -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"] -- GitLab