jpillora / grunt-aws

A Grunt interface into the Amazon Node.JS SDK
171 stars 44 forks source link

Feature to allow exclusion of files to upload (black list) #46

Closed abazinet closed 9 years ago

abazinet commented 9 years ago

This is a quick and dirty way to black list a file to avoid the S3 upload. For my scenario I build an index.html that I want to upload separately because it has different properties (different cache control for example).

The current code most likely does not support directories and wildcards...

jpillora commented 9 years ago

you should be able to just use Grunt globbing patterns: http://gruntjs.com/configuring-tasks#globbing-patterns right?

E.g.

// All files except for bar.js, in alpha order:
{src: ['foo/*.js', '!foo/bar.js'], dest: ...}
abazinet commented 9 years ago

You are right, I missed that. We can tell I am a grunt noob. I just noticed, we could also use filter for isFile:

foo: {
      src: ['tmp/**/*'],
      filter: 'isFile',
    }

Thank you for taking the time to look into this, I will close the PR.

jpillora commented 9 years ago

https://gswg.io/ :wink: