jpillora / grunt-aws

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

Add an exclude option #25

Closed evanplaice closed 9 years ago

evanplaice commented 9 years ago

Would it be possible to add an exclude option to the S3 sync tasks?

A simple array of files/folders to exclude would work.

jpillora commented 9 years ago

You should already be able to exclude files with glob options. Read more here http://gruntjs.com/configuring-tasks. It should look something like:

s3: {
  options: {
    accessKeyId: "<%= aws.accessKeyId %>",
    secretAccessKey: "<%= aws.secretAccessKey %>",
    bucket: "my-bucket"
  },

  //upload the img/ folder and all it's files EXCLUDING the secrets directory
  images: {
    src: [
      "img/**",
      "!img/secrets/**"
    ]
  }
}

Untested

evanplaice commented 9 years ago

Thanks. I didn't see that option in the documentation.