gulp-awspublish
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -0,2 +1,10 @@ | ||
0.0.19 / 2014-07-15 | ||
================== | ||
* Fixes #22 | ||
* Merge pull request #24 from koistya/master | ||
* Merge pull request #25 from scalableminds/master | ||
* added concurrent upload sample | ||
* Fix relative paths on Windows. Fixes pgherveou/gulp-awspublish#20 | ||
0.0.18 / 2014-07-08 | ||
@@ -3,0 +11,0 @@ ================== |
@@ -55,3 +55,3 @@ var Stream = require('stream'), | ||
file.s3.headers = {}; | ||
file.s3.path = file.path.replace(file.base, ''); | ||
file.s3.path = file.path.substring(file.base.length); | ||
} | ||
@@ -227,3 +227,3 @@ return file; | ||
return through.obj(function (file, enc, cb) { | ||
var header, etag; | ||
var header, etag, mimeType, charset; | ||
@@ -258,3 +258,7 @@ // Do nothing if no contents | ||
// add content-type header | ||
file.s3.headers['Content-Type'] = mime.lookup(file.path); | ||
mimeType = mime.lookup(file.path); | ||
charset = mime.charsets.lookup(mimeType); | ||
file.s3.headers['Content-Type'] = charset | ||
? mimeType + '; charset=' + charset.toLowerCase() | ||
: mimeType; | ||
@@ -261,0 +265,0 @@ // add content-length header |
{ | ||
"name": "gulp-awspublish", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "gulp plugin to publish files to amazon s3", | ||
@@ -39,8 +39,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"mocha": "*", | ||
"chai": "*", | ||
"concurrent-transform": "^1.0.0", | ||
"coveralls": "*", | ||
"mocha-lcov-reporter": "*", | ||
"gulp-rename": "*", | ||
"istanbul": "*", | ||
"chai": "*", | ||
"gulp-rename": "*" | ||
"mocha": "*", | ||
"mocha-lcov-reporter": "*" | ||
}, | ||
@@ -47,0 +48,0 @@ "engines": { |
@@ -171,2 +171,19 @@ # gulp-awspublish | ||
### upload file in parallel | ||
You can use `concurrent-transform` to upload files in parallel to your amazon bucket | ||
```js | ||
gulp | ||
.src('examples/fixtures/*.js') | ||
.pipe(parallelize(publisher.publish(), 10)) | ||
.pipe(awspublish.reporter()); | ||
``` | ||
## Plugins | ||
### gulp-awspublish-router | ||
A router for defining file-specific rules | ||
https://www.npmjs.org/package/gulp-awspublish-router | ||
## License | ||
@@ -173,0 +190,0 @@ |
@@ -158,3 +158,3 @@ /* global describe, before, it */ | ||
expect(files[0].s3.headers['x-amz-acl']).to.eq('public-read'); | ||
expect(files[0].s3.headers['Content-Type']).to.eq('text/plain'); | ||
expect(files[0].s3.headers['Content-Type']).to.eq('text/plain; charset=utf-8'); | ||
expect(files[0].s3.headers['Content-Length']).to.eq(files[0].contents.length); | ||
@@ -275,3 +275,3 @@ publisher.client.headFile('/test/hello.txt', function(err, res) { | ||
var filename = name + '.txt', | ||
headers = {'Content-Type': 'text/plain'}; | ||
headers = {'Content-Type': 'text/plain; charset=utf-8'}; | ||
before(function(done) { | ||
@@ -278,0 +278,0 @@ publisher.client.putBuffer(name, filename, headers, done); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29969
19
634
197
7
5