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

plugins return maps instead of arrays #12

Merged
merged 4 commits into from
Mar 8, 2017
Merged

plugins return maps instead of arrays #12

merged 4 commits into from
Mar 8, 2017

Conversation

giladgray
Copy link
Contributor

  • add documentalist.objectify function to convert array to map
  • update theme and plugins
  • namespace plugin interfaces so the nav is more legible

@blueprint-bot
Copy link

rename css interfaces too

Preview: docs

}

export interface ITypescriptPluginData {
ts: IInterfaceEntry[];
export interface ITsPluginData {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think all these sub interfaces are fine with the shortened "Ts" name, but this one in particular should match the name of the plugin so ITypescriptPluginData

@@ -1,4 +1,4 @@
- ts.sort((a, b) => a.name.localeCompare(b.name))
- var toc = Object.keys(ts).sort((a, b) => a.localeCompare(b))
Copy link
Contributor

Choose a reason for hiding this comment

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

heh, unobjectified then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't understand your words?

Copy link
Contributor

Choose a reason for hiding this comment

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

just that you changed this array to an object in this PR and now you're converting back to an array.

Copy link
Contributor Author

@giladgray giladgray Mar 8, 2017

Choose a reason for hiding this comment

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

well sure we need a sorted array for the table of contents. often both forms are needed at different times, so i guess it's a tradeoff either way.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah im fine with these changes, just found it amusing

@@ -172,6 +178,13 @@ export class Documentalist<T> implements IApi<T> {
return documentation;
}

public objectify<T>(array: T[], getKey: (item: T) => string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't really belong on the API, this is a stateless utility method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is true but we don't have a place for such things

@blueprint-bot
Copy link

ITypescriptPluginData

Preview: docs

@themadcreator
Copy link
Contributor

Fine, but we need to move that objectify method eventually

@giladgray giladgray merged commit 2c4bcdc into master Mar 8, 2017
@giladgray giladgray deleted the gg/objects branch March 8, 2017 22:00
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.

3 participants