const path = require('path');
const vfs = require('vinyl-fs');
const through = require('through2');
const sassdoc = require('../src/sassdoc');

function inspect() {
  let count = 0;

  return through.obj((chunk, enc, cb) => {
    count++;
    cb(null, chunk);
  }, (cb) => {
    console.log(count);
    cb();
  });
}

function documentize() {
  return sassdoc('./test/data', { verbose: true })
    .then(() => {
      console.log('yeah!');
    });
}

function stream() {
  return vfs.src('./test/data/**/*.scss')
    .pipe(sassdoc({ verbose: true }))
    .pipe(inspect())
    .on('data', () => {});
}

(async function () {
  try {
    await documentize();
    stream();
  }
  catch (err) {
    console.error(err);
  }
}());

@@ -19,24 +19,56 @@
 re('path');%0A
+const chalk = require('chalk');%0A
 const vfs = 
@@ -169,16 +169,168 @@
 doc');%0A%0A
+function devLog(...args) %7B%0A  args.unshift(chalk.styles.inverse.open)%0A  args.push(chalk.styles.inverse.close);%0A  console.log(...args);%0A  return this;%0A%7D%0A%0A
 function
@@ -460,25 +460,46 @@
     
-console.log(
+devLog(%60develop:stream:count:$%7B
 count
+%7D%60
 );%0A 
@@ -620,26 +620,39 @@
     
-console.log('yeah!
+devLog('develop:documentize:end
 ');%0A
@@ -684,22 +684,58 @@
 m() %7B%0A  
-return
+let parse = sassdoc(%7B verbose: true %7D);%0A%0A 
  vfs.src
@@ -774,35 +774,80 @@
 ipe(
-sassdoc(%7B verbose: true
+parse)%0A    .on('end', () =%3E %7B%0A      devLog('develop:stream:end');%0A   
  %7D)
-)
 %0A   
@@ -890,16 +890,101 @@
  =%3E %7B%7D);
+%0A%0A  return parse.promise.then(() =%3E %7B%0A    devLog('develop:stream:promise:end');%0A  %7D);
 %0A%7D%0A%0A(asy
@@ -1037,16 +1037,22 @@
 ();%0A    
+await 
 stream()

Update `develop` helpers