jonkemp / gulp-useref

Parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.
MIT License
705 stars 93 forks source link

Get scripts and stylesheets from remote locations via http #223

Closed mattbrunetti closed 7 years ago

mattbrunetti commented 7 years ago

Get scripts and stylesheets from remote locations via http, not just from the local file system

I think this would be awesome. We could easily drop in resources from CDNs or raw.githubusercontent.com or private servers. Some small projects might not even need a package manager.

@jonkemp Is this a feature you're interested in supporting? Would you review a PR?

btw, I tried doing this and this is the error I got, so I'm just assuming it's not supported..

C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\gulp-useref\node_modules\vinyl-fs\lib\src\index.js:32
    throw new Error('Invalid glob argument: ' + glob);
    ^

Error: Invalid glob argument: 
    at Object.src (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\gulp-useref\node_modules\vinyl-fs\lib\src\index.js:32:11)
    at DestroyableTransform.addAssetsToStream (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\gulp-useref\index.js:60:15)
    at C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\gulp-useref\index.js:119:31
    at Array.forEach (native)
    at DestroyableTransform.processAssets (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\gulp-useref\index.js:110:11)
    at C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\gulp-useref\index.js:172:31
    at Stream.<anonymous> (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\event-stream\index.js:306:20)
    at _end (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\through\index.js:65:9)
    at Stream.stream.end (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\through\index.js:74:5)
    at DestroyableTransform.onend (C:\Users\mbrunetti\Documents\mtdirect-frontend\node_modules\readable-stream\lib\_stream_readable.js:504:10)

Process finished with exit code 1
jonkemp commented 7 years ago

Not really interested. Thanks.

mattbrunetti commented 7 years ago

Ok. That's cool. Thanks.