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

How to include the hidden files/directories? #110

Closed
IonicaBizau opened this issue Jan 12, 2015 · 6 comments
Closed

How to include the hidden files/directories? #110

IonicaBizau opened this issue Jan 12, 2015 · 6 comments

Comments

@IonicaBizau
Copy link

I guess that the trick should be in src array passed to the bulk function.

@ctalkington
Copy link
Member

thats a good question. so your not seeing hidden files in the archive?

sometimes hidden files are in dot folders too so you would most likely need ['.*/**/*', '.*/*'] or dot: true. haven't personally tried this but should get you going in direction.

Include .dot files in normal matches and globstar matches. Note that an explicit dot in a portion of the pattern will always match dot files.

bulk relies on glob to provide the list and it should work beyond that.

@IonicaBizau
Copy link
Author

I actually need to archive a git repository, including the .git directory. When I do: src: ['.*/**/*', '.*/*'], nothing happens...

If I remove the src and add dot: true, I get:

     var exclusion = pattern.indexOf('!') === 0;
                            ^
TypeError: Cannot call method 'indexOf' of undefined

(/lib/util/file.js:26)

@ctalkington
Copy link
Member

sorry it would be:

dot: true with src: ['**/*'] most likely.

i personally haven't done this but its just a matter of finding the right glob pattern.

it also possible that you might not need the dot: true as **/* should match files in any subdir iirc.

if you want to get real specific, you could try .git/**/* too

@IonicaBizau
Copy link
Author

Thanks!

**/* didn't include the .git directory. However .git/**/* worked.

{ expand: true, src: ["*", ".git/**/*"], cwd: "...", dest: "..." }

One more question: how can I include all directories and files, recursively? The correspondent of zip -r foo.zip foo/.

@ctalkington
Copy link
Member

** should cover that with dot:true to make it match any dot files, i imagine

@IonicaBizau
Copy link
Author

Thanks!

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

2 participants