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

Regarding the non-conforming API: This is not a plugin? #4

Open
leoj3n opened this issue Apr 5, 2017 · 1 comment
Open

Regarding the non-conforming API: This is not a plugin? #4

leoj3n opened this issue Apr 5, 2017 · 1 comment

Comments

@leoj3n
Copy link
Contributor

leoj3n commented Apr 5, 2017

This "plugin" registers itself as a "processor":

https://github.com/bit-docs/bit-docs-process-tags/blob/master/bit-docs.js#L7

However, it does not conform to the API provided by bit-docs/bit-docs:

https://github.com/bit-docs/bit-docs-process-tags/blob/master/process-tags.js#L31

Unlike bit-docs-process-mustache, which does, for example:

https://github.com/bit-docs/bit-docs-process-mustache/blob/master/process-mustache.js#L25

It would seem bit-docs is making special accommodations for the non-conforming API of this plugin:

https://github.com/bit-docs/bit-docs/blob/b50c98cb3bc479bf19381eb0f2bf58ac7d1d62bf/lib/process/file.js#L70-L77

Seeing as this "plugin" is hard-coded into bit-docs, it's not really a plugin then, right?

Is it meant to be a piece that can be swapped out? Should it be made able to do so?

@leoj3n
Copy link
Contributor Author

leoj3n commented Apr 7, 2017

Additional note, bit-docs/bit-docs has this in package.json:

https://github.com/bit-docs/bit-docs/blob/85db64893741a09ffc91e72cf110c393272aaa62/package.json#L33

Which in turn has this in package.json:

"bit-docs-type-annotate": "^0.0.1"

Which results in these top-level node_modules in a project using bit-docs:

~/bit-docs-website master*
❯ ls node_modules/bit-docs
 -- files --
bit-docs/                bit-docs-process-tags/   bit-docs-type-annotate/

This is unlike all other plugins that live in the nested node_modules and are brought in by an explicit listing in the bit-docs.dependencies array of the package.json for the project.

I need to know, for documentation purposes, whether or not this behavior is going to remain unique for bit-docs-process-tags and bit-docs-type-annotate when compared to all other plugins.

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

1 participant