Procházet zdrojové kódy

update documentation for new folder location for json file

Chaitanya Rahalkar před 11 měsíci
rodič
revize
b7393f4d55

+ 2 - 0
docs/file-scrapers.md

@@ -298,7 +298,9 @@ Make sure to set the version per the release tag (e.g. r160). Note that the r pr
 curl https://codeload.github.com/mrdoob/three.js/tar.gz/refs/tags/r${VERSION} > threejs.tar.gz
 tar -xzf threejs.tar.gz
 mkdir -p docs/threejs~${VERSION}
+mv three.js-r${VERSION}/list.json /tmp/list.json
 mv three.js-r${VERSION}/docs/* docs/threejs~${VERSION}/
+
 rm -rf three.js-r${VERSION}/
 rm threejs.tar.gz
 ```

+ 1 - 0
lib/docs/filters/threejs/clean_html.rb

@@ -4,6 +4,7 @@ module Docs
       def call
         # Remove unnecessary elements
         css('head, script, style').remove
+        
         # Wrap code blocks with pre tags and add syntax highlighting
         css('code').each do |node|
           unless node.parent.name == 'pre'

+ 1 - 3
lib/docs/scrapers/threejs.rb

@@ -40,8 +40,6 @@ module Docs
       Licensed under the MIT License.
     HTML
 
-    self.class_attribute :release
-
     version '171' do
       self.release = '171'
       self.base_url = "https://threejs.org/docs"
@@ -53,7 +51,7 @@ module Docs
 
     def initial_paths
       paths = []
-      json_path = File.expand_path("docs/threejs~#{self.release}/list.json")
+      json_path = File.expand_path("/tmp/list.json")
       json_content = File.read(json_path)
       json_data = JSON.parse(json_content)