Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdirs not ignoring specified files #46

Open
jahvi opened this issue Jul 14, 2012 · 5 comments
Open

mkdirs not ignoring specified files #46

jahvi opened this issue Jul 14, 2012 · 5 comments

Comments

@jahvi
Copy link

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
Copy link
Owner

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
Copy link
Author

jahvi commented Jul 15, 2012

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

@jahvi jahvi closed this as completed Jul 15, 2012
@jahvi
Copy link
Author

jahvi commented Jul 15, 2012

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

.git*
build/**
.buildignore

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
Copy link
Owner

mklabs commented Jul 15, 2012

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

@robinpyon
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants