Skip to content

Commit 023a3ef

Browse files
authored
Merge pull request #70 from habdelra/dot-files
added config to include hidden folders in the S3 upload
2 parents 71e84e1 + b1bcb31 commit 023a3ef

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ The list of built project files. This option should be relative to `distDir` and
125125

126126
*Default:* `context.distFiles`
127127

128+
### dotFolders
129+
130+
This is a boolean that can be set to `true` to include hidden folders
131+
(that are prefixed with a `.`) as folders that can be uploaded to S3.
132+
133+
*Default:* `false`
134+
128135
### gzippedFiles
129136

130137
The list of files that have been gziped. This option should be relative to `distDir`. By default, this option will use the `gzippedFiles` property of the deployment context, provided by [ember-cli-deploy-gzip][3].

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
acl: 'public-read',
2222
cacheControl: 'max-age='+TWO_YEAR_CACHE_PERIOD_IN_SEC+', public',
2323
expires: EXPIRE_IN_2030,
24+
dotFolders: false,
2425
distDir: function(context) {
2526
return context.distDir;
2627
},
@@ -55,8 +56,9 @@ module.exports = {
5556
var manifestPath = this.readConfig('manifestPath');
5657
var cacheControl = this.readConfig('cacheControl');
5758
var expires = this.readConfig('expires');
59+
var dotFolders = this.readConfig('dotFolders');
5860

59-
var filesToUpload = distFiles.filter(minimatch.filter(filePattern, { matchBase: true }));
61+
var filesToUpload = distFiles.filter(minimatch.filter(filePattern, { matchBase: true, dot: dotFolders }));
6062

6163
var s3 = this.readConfig('uploadClient') || new S3({
6264
plugin: this

tests/unit/index-nodetest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('s3 plugin', function() {
122122
return previous;
123123
}, []);
124124

125-
assert.equal(messages.length, 4);
125+
assert.equal(messages.length, 5);
126126
});
127127

128128
describe('required config', function() {

0 commit comments

Comments
 (0)