Skip to content

Support jsdoc and typedoc doctools #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
humitos opened this issue Oct 15, 2020 · 4 comments
Closed

Support jsdoc and typedoc doctools #147

humitos opened this issue Oct 15, 2020 · 4 comments
Labels
Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Oct 15, 2020

We need to pin these dependencies to make the image reproducible over time:

https://github.com/rtfd/readthedocs-docker-images/blob/89bb0b60820ab0960d5cc875667ba2570c5ffb99/Dockerfile#L128-L130

@humitos humitos added the Improvement Minor improvement to code label Oct 15, 2020
@humitos
Copy link
Member Author

humitos commented Jul 20, 2021

Versions on images from production today:

(docs) docs@build-default-i-0a1801f3c8ed1d18c:~$ docker run readthedocs/build:5.0 jsdoc --version
JSDoc 3.6.6 (Sun, 20 Sep 2020 02:25:14 GMT)
(docs) docs@build-default-i-0a1801f3c8ed1d18c:~$ docker run readthedocs/build:6.0 jsdoc --version
JSDoc 3.6.6 (Sun, 20 Sep 2020 02:25:14 GMT)
(docs) docs@build-default-i-0a1801f3c8ed1d18c:~$ docker run readthedocs/build:7.0 jsdoc --version
JSDoc 3.6.6 (Sun, 20 Sep 2020 02:25:14 GMT)

typedoc --version is failing, but I'd guess by the date the docker images were built that:

  • 5.0 (built 9 months ago) has typedoc 0.19.2
  • 6.0 (built 9 months ago) has typedoc 0.19.2
  • 7.0 (built 5 months ago) has typedoc 0.20.20

I can support this guess by parsing the package.json:

(docs) docs@build-default-i-0a1801f3c8ed1d18c:~$ docker run --rm -it readthedocs/build:7.0 cat /usr/local/lib/node_modules/typedoc/package.json | grep version
  "version": "0.20.20"
(docs) docs@build-default-i-0a1801f3c8ed1d18c:~$ docker run --rm -it readthedocs/build:6.0 cat /usr/local/lib/node_modules/typedoc/package.json | grep version
    "postbuild": "node scripts/replace_application_version.js",
  "version": "0.19.2"
(docs) docs@build-default-i-0a1801f3c8ed1d18c:~$ docker run --rm -it readthedocs/build:5.0 cat /usr/local/lib/node_modules/typedoc/package.json | grep version
    "postbuild": "node scripts/replace_application_version.js",
  "version": "0.19.2"

Reference: https://www.npmjs.com/package/typedoc

@humitos
Copy link
Member Author

humitos commented Jul 20, 2021

Building 7.x using #174 generates this warning message

npm WARN [email protected] requires a peer of [email protected] || 4.0.x || 4.1.x but none was installed.

I'm not sure if it's important or not and I think it was already present in this image. Maybe typedoc --version breaks because of that? 🤔

@humitos
Copy link
Member Author

humitos commented Sep 2, 2021

I'm thinking about how to handle this case in the new images (#166). I prefer if we don't include these at this moment because we will need to handle versioning again on the base image. I'm not aware how many users are currently using these packages and if there is a good way to install them (without hacking the conf.py).

On the other hand, these are documentation tools (like Sphinx or MkDocs). Because of that, if we want to support them, we should allow them to be installed as any other doctool. I'd like to add support for them on the "Future builders" when we allow custom commands.

@humitos humitos changed the title Pin jsdoc and typedoc Support jsdoc and typedoc doctools Sep 2, 2021
@humitos
Copy link
Member Author

humitos commented Apr 5, 2022

It seems this is not required anymore. New Docker images does not include jsdoc nor typedoc and they could be installed using build.apt_packages.

@humitos humitos closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

1 participant