[WIP] Default to ./
when no <src>
and support -
as stdin
#348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
src
#347Usage:
This implies streamlining the behavior of
sassdoc(src)
and.pipe(sassdoc())
, especially supportingrecurse
,exclude
andconverter
in the streaming version.While I think it's good to have the same behavior in both usages, it's maybe harmful for plugins usage?
Anyway, we're about to release 2.0 and this feature have not been heavily tested, so it's not a good idea to merge it right away.
Though, we need to be concerned about not breaking the API, that is, if we plan to have this default
./
and-
support in 2.0, we need to at least add the default directory and drop thestdin
support before releasing 2.0.But I'm afraid the behavior streamlining between
sassdoc(src)
and.pipe(sassdoc())
can be considered as a breaking change too, and if we want this, we might not be able to use it until 3.0.Note: according to #347, this PR is missing a default exclude pattern when using the CWD (to not documentize
node_modules
and other vendor directories, and I'd also avoid documenting the destination directory if it's contained in CWD, even if it's not supposed to contain Sass files).Opinions?