0

Question relates to http://sassdoc.com package

I would like to parse each *.scss file in ./source folder, but instead of generating sassdoc folder i would like to create partial-html for each parsed file. For example:

parse: variables.scss and receive variables.html, without page header, sidebar - pure content, even without html and body tags.

My current code:

var gulp = require('gulp'),
    sassdoc = require('sassdoc');

var paths = {
  scss: [
    'source/**/*.scss'
  ]
};

gulp.task('sassdoc', function () {
  console.log("sassdoc task finished");
  return gulp.src(paths.scss)
    .pipe(sassdoc());
});
Dariusz Sikorski
  • 4,309
  • 5
  • 27
  • 44

1 Answers1

-1

It's not possible with SassDoc' default theme. So you'd need to build your own theme to acheive this. http://sassdoc.com/using-your-own-theme

Each item is given a file key in resulting data, so I would leverage that and do some merging.

That could potentially end up in a sassdoc-extra custom filter. http://sassdoc.com/extra-tools

EDIT:
Actually your question is quite misleanding, you want a variable.html file but with no html ...

If all that you want is the raw JSON data from SassDoc, without any kind of theme processing, then the parse method is what you're looking for.

But again, unless you call SassDoc on each file separately, you'll get all files together, meaning post data processing to split them, that's why a custom theme (even with no html output) is the way to go.

Pascal Duez
  • 671
  • 5
  • 7