Menu icon Foundation
Can Sherpa support a Multi Page Styleguide?

Hi - I'm trying to put together a style guide and want to be able to leverage Style Sherpa, however I need to be able to support ~30 different pages.

I figured I can run the sherpa command over each of the 30 .md files, but this would bloat the gulpfile and be hard to maintain. Is there a more elegant way to pipe multiple files in (e.g. /src/styleguide/**/*.{md}) and and run them all through Sherpa?

I tried the below using the syntax from Panini, but gulp threw an error because Sherpa expects the src path to be a string. 

function styleGuide(done) {
    return gulp.src('src/styleguide/**/*.{md}')
     .pipe(sherpa({
          template: 'src/styleguide/template.html'
      }))
      .pipe(gulp.dest(PATHS.dist));
}

Any ideas?

 

sherpagulp

Hi - I'm trying to put together a style guide and want to be able to leverage Style Sherpa, however I need to be able to support ~30 different pages.

I figured I can run the sherpa command over each of the 30 .md files, but this would bloat the gulpfile and be hard to maintain. Is there a more elegant way to pipe multiple files in (e.g. /src/styleguide/**/*.{md}) and and run them all through Sherpa?

I tried the below using the syntax from Panini, but gulp threw an error because Sherpa expects the src path to be a string. 

function styleGuide(done) {
    return gulp.src('src/styleguide/**/*.{md}')
     .pipe(sherpa({
          template: 'src/styleguide/template.html'
      }))
      .pipe(gulp.dest(PATHS.dist));
}

Any ideas?