jsoverson / preprocess

Preprocess HTML, JavaScript, and other files with directives based off custom or ENV configuration
Other
366 stars 80 forks source link

Don't write underscore files to dest #102

Closed scottzirkel closed 4 years ago

scottzirkel commented 8 years ago

What I'd like to do is process the files with includes, but not write the files to the destination folder.

For instance, in this directory structure:

+ html
  + templates
    - _footer.html
    - _header.html
  - index.html (@include templates/_header & footer)

I am expecting the output to just be index.html. Right now I'm getting the index.html (with the header & footer contents properly included) but I'm also getting templates/_header & _footer in the destination folder. These are superfluous and aren't being used on the server.

I have tried to ignore the templates folder in the src, but that doesn't seem to have an effect.

There might be a way to do this already, but I looked through the docs and didn't see it. If so, please point me in the right direction.

pioug commented 4 years ago

preprocess is only working with strings. Files are handled by the plugins/tools built on top of it. Assuming you're using preprocess with Gulp or Grunt, your issue should be solved at this level.

scottzirkel commented 4 years ago

Pretty sure I either solved this or figured out a different method years ago. But thanks for the update, maybe it will help someone who is currently having the issue.