SoftwareBrothers / better-docs

Beautiful toolbox for jsdoc generated documentation - with 'typescript', `category` and `component` plugins
MIT License
855 stars 127 forks source link

[deps] "parcel" not found - pls fix or document #45

Open DoubleU23 opened 4 years ago

DoubleU23 commented 4 years ago

had to install "parcel" manually

FYI: im currently on a windows machine - if that is an issue

wojtek-krysiak commented 4 years ago

Hi - thanks for using it. Unfortunately parcel cannot be a dependency because better docs can be used without it (if you don't have @component tags in the code). In the docs, I've written it under "Installation instructions" in @component plugin section.

Nevertheless probably not everyone reads the docs, so what I would suggest is to maybe add an error explaining that parcel has to be installed globally.

DoubleU23 commented 4 years ago

Thank you ery much for the explanation. Wasn't sure about that.

sbmadhav commented 4 years ago

@wojtek-krysiak - does parcel have to be a global dependecy? Can't we add it as a devDependency in our code? Appreciate any leads here.

wojtek-krysiak commented 4 years ago

when we put it as devDependency - it means that all users will have to install it even if they don't use @component plugin. That is why it has to be installed as a global dependency.

myreli commented 4 years ago

Old thread but an update:

Since 5.2.x npm provides npx out of the box, which allows us to use parcel as a development dep without the need for a global install. As an enhancement, a command-line interface could let the user choose between adding or not parcel-bundler as a peer dependency during better-docs install. The same tool could generate the most common setups.

Now with a single npm install jsdoc better-docs parcel-bundler --save-dev everything works as expected. Maybe that could be added to the docs.

wojtek-krysiak commented 4 years ago

yep CLI will be perfect but this is rather bigger task - don't have this in the TODO right now :(