mkdirs not ignoring specified files #46

jahvi opened this Issue Jul 14, 2012 · 5 comments


None yet

3 participants

jahvi commented Jul 14, 2012

Not sure if I'm doing something wrong but the mkdirs command is just copying everything in my root directory to my publish and intermediate folders, I'm using the basic grunt config that gets generated with h5bp init:

// the staging directory used during the process
staging: 'intermediate',
// final build output
output = 'publish';
// filter any files matching one of the below pattern during mkdirs task
// the pattern in the .gitignore file should work too.
exclude: '.git* build/** node_modules/** grunt.js package.json *.md'.split(' '),
mkdirs: {
    staging: '<config:exclude>'

But the exclude option looks like it's getting ignored

mklabs commented Jul 15, 2012

Thanks for the feedback Javier. You're not doing anything wrong, it's the build script that does.

I'll update the generated gruntfile today, and the matching documentation in the wiki:

  • the exclude property is obsolete now, we have totally moved to the .gitignore file way of doing so.
  • we're using fstream-ignore to do the actual copy, and support exclude pattern from either .gitignore, .buildignore or .ignore file. They work recursively, meaning that you can specify fils to exclude throughout your file tree, like you would do with git.

Does it make sense?

jahvi commented Jul 15, 2012

Thanks for the clarification I just tested it and it's working fine 👍

@jahvi jahvi closed this Jul 15, 2012
jahvi commented Jul 15, 2012

Just noticed that my 404.html file wasn't getting copied over. My .buildignore file looks like this:


However if I remove the last line then it works but my .buildignore file gets copied as well. I'm using the default h5bp file structure with the exception that I put my grunt.js and config files in a sub-directory called build

@jahvi jahvi reopened this Jul 15, 2012
mklabs commented Jul 15, 2012

Hmm.. Interesting. I'll try to reproduce the issue locally.


I've come across some odd behaviour in a similar vein.

To recreate:

h5bp init (default options)
mkdir foo bar test
echo -e ".git*\n.buildignore" > .buildignore 
h5bp default

In the above example, the test folder is omitted in both intermediate and publish folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment