-
Notifications
You must be signed in to change notification settings - Fork 1
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
ignore folders/files #20
Comments
@artknight Commands:
sources One or more globs, files or directories to be mirrored (glob
exclusions are supported as well - ! prefix) So every files/folders you want to exclude need to be prefixed by sync-glob 'src/images/*' '!src/images/exclude.png' dist/images Hope that helps, I will leave it open until I updated the docs. |
Any improvements regarding docs will be tracked in #22 |
So, I tried running this
and it does not seem to work. I am assuming my syntax is incorrect. basically i want to sync all files/folders except for *.db, *.gitignore and none of the other folders inside the [] |
May I ask you to provide your folder structure? From your code I assume you want to sync all first children only or I strongly advise you to make yourself familiar with GLOB patterns and especially how directories and folders are supposed to work in UNIX style (cwd, root, etc.). A good primer on GLOBs can be found here https://github.com/isaacs/node-glob#glob-primer Good Luck |
So the folder structure is as follows project/cfc So, basically I need to sync everything (files & folders) to the local server
etc... |
@artknight So what you need is something like: sync-glob 'project/**/*' '!project/{BIN,WEB-INF}/' '!**/*.{db,gitignore}' '!project/images/{company,icons}/' targetDir You can provide What it does
Hope this helps and really make sure to study stuff about Unix files and folder structures, Globbing and stuff like that 😉 |
@AndyOGo thank you for your help. So I got it to work but there are a few questions I do have. I see that it Also I noticed that folders such as Here is the string that I am running
|
@artknight Oh, if the exclusion |
It seems you have a typo, is |
its "companies" ( plural ) but it also not working for "css". It does
however work for file extensions.
Art
…-- Arthur
On Wed, Apr 5, 2017 at 4:12 PM, Andreas ***@***.***> wrote:
It seems you have a typo, is companies or company?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJoQm2WtdzRa6pzf4mWgYaCalTEUYgcks5rs_W6gaJpZM4L7TVD>
.
|
hmh, then it seems to be a bug. |
Unfortunately I am running win7 on this particular machine.
Art
…-- Arthur
On Wed, Apr 5, 2017 at 4:29 PM, Andreas ***@***.***> wrote:
hmh, then it seems to be a bug.
May I ask you which os are you using?
I could test on osx.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJoQt2y6rX0jfuOBhITkNGeJ_1mb1Cgks5rs_mPgaJpZM4L7TVD>
.
|
oh damn, I recently posted a few win7 bugs with |
I just found out that |
Windows console.log test\sync.spec.js:26
[ 'remove',
[ 'tmp\\mock\\a.txt', 'tmp\\sync\\tmp\\mock\\a.txt' ] ] Should be same as on OS X console.log test/sync.spec.js:26
[ 'remove', [ 'tmp/mock/a.txt', 'tmp/sync/a.txt' ] ] |
@AndyOGo I finally got around to test this. I just synced up to the latest ( v 1.3.8 ) and it still does not seem to work. Here is the string i am running Unfortunately it did copy over the |
@AndyOGo I tried to run the same on my mac and it started complaining about
|
@artknight Thank you very much. |
@AndyOGo curious, is there a way to watch to combine two different sync 1 sunc 2 basically the first one will copy/watch everything in the root directory except for the |
@artknight Theoretically you should just be able to use (without excluding the Hope that helps. |
@AndyOGo yeah the |
I am not sure if this lib has the ability to ingore certain folders/files within a source folder. If it does, would you please provide an example on how to set it up.
Thanks,
PS: great job on the plugin!
The text was updated successfully, but these errors were encountered: