sassdoc
sassdoc copied to clipboard
Change behavior when no `src`
Currently sassdoc executed as-is will try to read from stdin for SCSS input (that is, meant to be used like cat file | ... | sassdoc.
Though I don't expect this to be a common use and we might better default to documenting the CWD when SassDoc is executed without any src.
The - is a standard convention to mean stdin/stdout in Unix commands: http://tldp.org/LDP/abs/html/special-chars.html#DASHREF2
Seconded.
Like it.
Oh! If we default to ./, we can't put the documentation in sassdoc.
Why?
Because it will document theme stylesheets with project stylesheets… and it feels odd dest is contained in src, even if it should not be prohibited by safe-wipe.
C-style comments don't exist anymore. Project stylesheets won't contain any SassDoc comment.
Oh right, it's okay if sassdoc directroy don't contains SassDoc comments, then.
Though we might need some sort of default excludes, we don't want to documentize files under node_modules or any other vendor directory…
Agreed.
This can't be merged for the today 2.0 release for sure. The problem is the current behavior is to read from stdin when no <src> is given. It will be a breaking change if we want to fallback to current directory later, and we'll need to wait 3.0 for this.
It's possible to drop the current "stdin by default" behavior before releasing 2.0, and require at least one <src>, so we're free to include whatever default behavior we want later on.
Opinions on this @SassDoc/owners? We need to take an action on this before releasing 2.0.
I suppose we can also consider dropping the idea of not passing src to default to ./. It was just a suggestion, I'm not sure it's a big deal in any way.
The dash for stdin was merged (#350), so we can choose whatever we want for default behavior subsequently.
There's a WIP PR to use ./ by default in #351. We'll see later how to improve this.