Skip to content

Commit 8be79e3

Browse files
committed
Ensure no doc url for custom classes
1 parent f616ae0 commit 8be79e3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

js/scripts/generate-wrappers.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,8 @@ class PythonWrapper {
665665
// check if manual file exists
666666
this.hasOverride = fse.existsSync(this.pyDestPath);
667667

668+
this.isCustom = CUSTOM_CLASSES.indexOf(modulePath) !== -1;
669+
668670
this.hasParameters = false;
669671

670672
this.config = getClassConfig(this.className);
@@ -692,6 +694,7 @@ class PythonWrapper {
692694
properties: this.properties,
693695
dependencies: this.dependencies,
694696
hasOverride: this.hasOverride,
697+
isCustom: this.isCustom,
695698
};
696699

697700
// Render template
@@ -815,6 +818,10 @@ class PythonWrapper {
815818

816819
processDocsUrl() {
817820

821+
if (this.isCustom) {
822+
this.docsUrl = null;
823+
}
824+
818825
const refTokens = this.modulePath.split(pathSep);
819826

820827
// strip extension off filename

js/scripts/templates/py_wrapper.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ class {{ className }}({{ superClass.className }}):
2323

2424
Autogenerated by {{ generatorScriptName }}
2525
Date: {{ now }}
26+
{{#if isCustom}}
27+
This class is a custom class for pythreejs.
28+
{{else}}
2629
See {{ threejs_docs_url }}
30+
{{/if}}
2731
"""
2832

2933
{{#unless constructor.hasParameters}}

0 commit comments

Comments
 (0)