Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Documentation for extensions #77

Merged
merged 6 commits into from
Feb 26, 2020
Merged

Documentation for extensions #77

merged 6 commits into from
Feb 26, 2020

Conversation

nokome
Copy link
Member

@nokome nokome commented Feb 26, 2020

Completes the first bullet point of #71.

Also add autogeneration of a table of themes (but not documentation around that).

@codecov-io
Copy link

Codecov Report

Merging #77 into next will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next      #77   +/-   ##
=======================================
  Coverage   91.05%   91.05%           
=======================================
  Files           3        3           
  Lines         123      123           
  Branches       34       34           
=======================================
  Hits          112      112           
  Misses         11       11
Impacted Files Coverage Δ
src/util/index.ts 99% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a9a074...64bea2b. Read the comment docs.

Comment on lines 34 to 40
let readme = await readFile(readmePath, 'utf8')

readme = await themeDocs(readme)
readme = await extsDocs(readme)
readme = await apiDocs(readme)

await writeFile(readmePath, readme)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistic suggestion: might be idiomatic promise-wise to have something like:

  const readme = readFile(readmePath, 'utf8')
                 .then(themeDocs)
                 .then(extsDocs)
                 .then(apiDocs)
                 .catch(/*handle the error*/)

perhaps renaming the function names with a generate prefix?

If the three doc generation functions don't need to run sequentially(?), Promise.all might be a candidate here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks David, good suggestions (that reassignment definitely didn't feel right but I didn't stop to think how it could be done better 🙂 ).

Copy link
Collaborator

@alex-ketch alex-ketch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚👍

@nokome nokome merged commit b33b09f into next Feb 26, 2020
@nokome nokome deleted the 71-extensions branch February 26, 2020 17:21
@stencila-ci
Copy link
Collaborator

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants