Skip to content

Add new package for loading tsdoc-config.json file#196

Merged
octogonz merged 20 commits intomasterfrom
octogonz/tsdoc-config
Nov 19, 2019
Merged

Add new package for loading tsdoc-config.json file#196
octogonz merged 20 commits intomasterfrom
octogonz/tsdoc-config

Conversation

@octogonz
Copy link
Collaborator

@octogonz octogonz commented Nov 15, 2019

Initial sketch of the tsdoc-config.json feature proposed in RFC #7.

Because the loader relies on NodeJS libraries as well as resolve and ajv, I put this code in a separate NPM package @microsoft/tsdoc-config. That way @microsoft/tsdoc can remain fully self-contained and portable.

@ecraig12345

@@ -0,0 +1,59 @@
{
"name": "@microsoft/tsdoc-config",
"version": "0.12.15",
Copy link
Member

Choose a reason for hiding this comment

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

This is a weird version. Is this package expected to stay in lockstep with the tsdoc package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that would be best, but I'll set up the version policy in a separate PR, since it may alter the CI scripts.

@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
Copy link
Member

Choose a reason for hiding this comment

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

Is this file necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was just copied from the other projects in the repo. Probably they should all be removed. But let's deal with that in a separate PR.

private static _findConfigPathForFolder(folderPath: string): string {
if (folderPath) {
let foundFolder: string = folderPath;
for (;;) {
Copy link
Member

Choose a reason for hiding this comment

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

Ew.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Infinite loops are the One True Loop Style! (1TLS) do/while are degenerate special cases. 😊

@@ -0,0 +1,36 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

You don't want to pull RSC into this repo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's been useful to have a counterexample of a minimalist toolchain. I'd consider heft, though.

@octogonz octogonz merged commit 59860dd into master Nov 19, 2019
@octogonz octogonz deleted the octogonz/tsdoc-config branch November 19, 2019 21:39
octogonz added a commit to microsoft/json-schemas that referenced this pull request Nov 19, 2019
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

Successfully merging this pull request may close these issues.

2 participants