style-sherpa
style-sherpa copied to clipboard
Configuring Sherpa to run N .md files?
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));
}
Any feedback on this feature request? It's been sat here since May 2016.
Did anyone ever figure this out?
@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.