Paul Walko 486ed15b61 | ||
---|---|---|
.. | ||
node_modules | ||
CHANGELOG.md | ||
Gulpfile.js | ||
LICENSE | ||
README.md | ||
index.js | ||
package.json |
README.md
gulp-remote-src
Remote gulp.src
.
Installation
Install package with NPM and add it to your development dependencies:
npm install --save-dev gulp-remote-src
Usage
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var remoteSrc = require('gulp-remote-src');
gulp.task('remote', function() {
remoteSrc(['app.js', 'jquery.js'], {
base: 'http://myapps.com/assets/',
})
.pipe(uglify())
.pipe(gulp.dest('./dist/'));
})
Options
-
base
Url base.
-
buffer
(default is true)Pipe out files as buffer or as stream. Note that some plugins does not support streaming.
Request Options
gulp-remote-src
uses request to make HTTP request, you can specify below
options to customize your request:
qs
- object containing querystring values to be appended to theuri
headers
- http headers (default:{}
)auth
- A hash containing valuesuser
||username
,pass
||password
, andsendImmediately
(optional). See documentation above.followRedirect
- follow HTTP 3xx responses as redirects (default:true
). This property can also be implemented as function which getsresponse
object as a single argument and should returntrue
if redirects should continue orfalse
otherwise.followAllRedirects
- follow non-GET HTTP 3xx responses as redirects (default:false
)maxRedirects
- the maximum number of redirects to follow (default:10
)timeout
- Integer containing the number of milliseconds to wait for a request to respond before aborting the requestproxy
- An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for theurl
parameter (by embedding the auth info in theuri
)strictSSL
- Iftrue
, requires SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that CA as an option.aws
-object
containing AWS signing information. Should have the propertieskey
,secret
. Also requires the propertybucket
, unless you’re specifying yourbucket
as part of the path, or the request doesn’t use a bucket (i.e. GET Services)gzip
- Iftrue
, add anAccept-Encoding
header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response.
Changelog
v0.1.0 (2014-06-30)
First release.
v0.2.0 (2014-07-01)
Fix streaming pipe.
Add tests for streaming pipe.
v0.2.1 (2014-07-18)
Add option strictSSL
(thank you @Magomogo)
v0.3.0 (2014-09-02)
Pass through request options to make it flexible.