History

update documentation for new folder location for json file

Chaitanya Rahalkar committed 1 year ago

Commit b7393f41 parent 8d0efa73 files · +4 −3Browse files

Unified · Split

3 files
  1. docs/file-scrapers.md +2 −0
  2. lib/docs/filters/threejs/clean_html.rb +1 −0
  3. lib/docs/scrapers/threejs.rb +1 −3
docs/file-scrapers.md+2−0
@@ -298,7 +298,9 @@ Make sure to set the version per the release tag (e.g. r160). Note that the r pr · 297 unmodified lines
298curl https://codeload.github.com/mrdoob/three.js/tar.gz/refs/tags/r${VERSION} > threejs.tar.gz298curl https://codeload.github.com/mrdoob/three.js/tar.gz/refs/tags/r${VERSION} > threejs.tar.gz
299tar -xzf threejs.tar.gz299tar -xzf threejs.tar.gz
300mkdir -p docs/threejs~${VERSION}300mkdir -p docs/threejs~${VERSION}
301mv three.js-r${VERSION}/list.json /tmp/list.json
301mv three.js-r${VERSION}/docs/* docs/threejs~${VERSION}/302mv three.js-r${VERSION}/docs/* docs/threejs~${VERSION}/
303
302rm -rf three.js-r${VERSION}/304rm -rf three.js-r${VERSION}/
303rm threejs.tar.gz305rm threejs.tar.gz
304```306```
lib/docs/filters/threejs/clean_html.rb+1−0
@@ -4,6 +4,7 @@ module Docs · 3 unmodified lines
4 def call4 def call
5 # Remove unnecessary elements5 # Remove unnecessary elements
6 css('head, script, style').remove6 css('head, script, style').remove
7
7 # Wrap code blocks with pre tags and add syntax highlighting8 # Wrap code blocks with pre tags and add syntax highlighting
8 css('code').each do |node|9 css('code').each do |node|
9 unless node.parent.name == 'pre'10 unless node.parent.name == 'pre'
lib/docs/scrapers/threejs.rb+1−3
@@ -40,8 +40,6 @@ module Docs · 39 unmodified lines
40 Licensed under the MIT License.40 Licensed under the MIT License.
41 HTML41 HTML
42 42
43 self.class_attribute :release
44
45 version '171' do43 version '171' do
46 self.release = '171'44 self.release = '171'
47 self.base_url = "https://threejs.org/docs"45 self.base_url = "https://threejs.org/docs"
@@ -53,7 +51,7 @@ module Docs · 5 unmodified lines
53 51
54 def initial_paths52 def initial_paths
55 paths = []53 paths = []
56 json_path = File.expand_path("docs/threejs~#{self.release}/list.json")54 json_path = File.expand_path("/tmp/list.json")
57 json_content = File.read(json_path)55 json_content = File.read(json_path)
58 json_data = JSON.parse(json_content)56 json_data = JSON.parse(json_content)
59 57