SassDoc / sassdoc

Release the docs!
http://sassdoc.com
MIT License
1.41k stars 56 forks source link

Passing any options to sassdoc will not load .sassdocrc #544

Open joneff opened 4 years ago

joneff commented 4 years ago

Passing any options, including empty object to sass doc i.e. sassdoc({}) will not load .sassdocrc. Reason being that if the option is object, it will not load default config, but instead assume it has been loaded.

https://github.com/SassDoc/sassdoc/blob/21bf5916a3e624f5c420a6e1e049395dc0efe9ea/src/environment.js#L73-L90

Tested with 2.7.1.

pascalduez commented 4 years ago

Hi,

how is this an issue? Seems like a wanted behaviour.

joneff commented 4 years ago

If it's wanted behaviour, then consider this not a bug report, but rather a feature request. To me, it makes perfect sense to be able to pass both configuration file and options.

I would imagine that the scenario I stumbled upon, having multiple directories with sass files that need to be documented with some common and specific settings, isn't unique. Those are the cases where the common settings could be passed as object and the speccific setings as config file.

pascalduez commented 4 years ago

I understand, if you're willing to rephrase the issue under a "feature request", and detail the needs and expectations, it can maybe be considered for the next major (whenever that be...). Changing that sort of behaviour on the current major would probably bring too much troubles.