Skip to content
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

Rendering from git clone vs npm install #3

Open
cspotcode opened this issue Jul 13, 2021 · 3 comments
Open

Rendering from git clone vs npm install #3

cspotcode opened this issue Jul 13, 2021 · 3 comments

Comments

@cspotcode
Copy link
Collaborator

cspotcode commented Jul 13, 2021

Can we render docs from an extracted npm tarball, or will we need to render from the sources in git?

Ideally we can do the former. An npm tarball is packaged to work within a user's IDE via the language service. Whatever tooltips the user sees while using a library will be driven by the npm tarball. So we should render based on the same.

git sources may or may not require a complex build script which we cannot run in our docs renderer.


If we render based on the npm tarball, I wonder, will docs rendering be as simple as the following?

touch package.json
yarn add --ignore-scripts target-lib@target-version
cd node_modules/target-lib
run-typedoc-rendering-command
@keithlayne
Copy link
Collaborator

I was gonna throw something together later if nobody does first. Just the simplest thing that could work. I was considering even a shell script, but first pass probably just shell out in a temp dir for each of the configured packages and start with something like that.

Also was thinking about keeping some kind of state (versions already rendered) in maybe a JSON file in the docs branch. Not sure about that.

@cspotcode
Copy link
Collaborator Author

State in JSON and shell script both sound smart to me.

I know way too many advanced bash tricks, so ping me if you need to do something tricky.

FWIW git has a bunch of advanced features such as "git notes" which may or may not be useful for storing advanced state in git. JSON file seems simpler, but you never know, git notes might be useful.

@cspotcode
Copy link
Collaborator Author

cspotcode commented Jul 14, 2021

I pushed a really quick-and-dirty script to the main branch. It only renders docs, some of the emitted docs look wrong, and it doesn't attempt to push anything to github pages.

yarn work to try it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants