Skip to content

Commit b7393f4

Browse files
update documentation for new folder location for json file
1 parent 8d0efa7 commit b7393f4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/file-scrapers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ Make sure to set the version per the release tag (e.g. r160). Note that the r pr
298298
curl https://codeload.github.com/mrdoob/three.js/tar.gz/refs/tags/r${VERSION} > threejs.tar.gz
299299
tar -xzf threejs.tar.gz
300300
mkdir -p docs/threejs~${VERSION}
301+
mv three.js-r${VERSION}/list.json /tmp/list.json
301302
mv three.js-r${VERSION}/docs/* docs/threejs~${VERSION}/
303+
302304
rm -rf three.js-r${VERSION}/
303305
rm threejs.tar.gz
304306
```

lib/docs/filters/threejs/clean_html.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class CleanHtmlFilter < Filter
44
def call
55
# Remove unnecessary elements
66
css('head, script, style').remove
7+
78
# Wrap code blocks with pre tags and add syntax highlighting
89
css('code').each do |node|
910
unless node.parent.name == 'pre'

lib/docs/scrapers/threejs.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class Threejs < FileScraper
4040
Licensed under the MIT License.
4141
HTML
4242

43-
self.class_attribute :release
44-
4543
version '171' do
4644
self.release = '171'
4745
self.base_url = "https://threejs.org/docs"
@@ -53,7 +51,7 @@ def get_latest_version(opts)
5351

5452
def initial_paths
5553
paths = []
56-
json_path = File.expand_path("docs/threejs~#{self.release}/list.json")
54+
json_path = File.expand_path("/tmp/list.json")
5755
json_content = File.read(json_path)
5856
json_data = JSON.parse(json_content)
5957

0 commit comments

Comments
 (0)