style-sherpa icon indicating copy to clipboard operation
style-sherpa copied to clipboard

Configuring Sherpa to run N .md files?

Open npapazian opened this issue 8 years ago • 3 comments

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 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));
}

npapazian avatar May 23 '16 02:05 npapazian

Any feedback on this feature request? It's been sat here since May 2016.

adrianwhite avatar Jan 12 '17 08:01 adrianwhite

Did anyone ever figure this out?

lendlsmith avatar May 06 '19 13:05 lendlsmith

@ilendl2 the problem here is sherpa is no gulp plugin and can therefore not be used as done by @npapazian That's how it's supposed to be used: https://github.com/zurb/foundation-zurb-template/blob/master/gulpfile.babel.js#L74

However I was also facing the constraint when trying to integrate style-sherpa into my webpack setup. I've written my own loader which is completely independent: https://github.com/SassNinja/style-sherpa-loader

If you use it (in a webpack setup of course) you will be able to build several style guides as desired.

SassNinja avatar May 07 '19 07:05 SassNinja