Skip to content

Commit

Permalink
Maintenance (#259)
Browse files Browse the repository at this point in the history
* Update CI config

* Update deprecated buffer usage

* Update dependencies

* Fix eslint error

* Update deprecated buffer usage
  • Loading branch information
jonkemp committed Oct 6, 2019
1 parent 23e3143 commit 98c621f
Show file tree
Hide file tree
Showing 6 changed files with 2,022 additions and 2,123 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
sudo: false
language: node_js
node_js:
- '12'
- '10'
- '8'
- '6'
before_script:
- npm install -g gulp
- gulp lint
Expand Down
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function addAssetsToStream(paths, files) {
var self = this,
gulpif = require('gulp-if'),
concat = require('gulp-concat'),
isRelativeUrl = require('is-relative-url'),
vfs = require('vinyl-fs'),
extend = require('extend'),
src,
Expand All @@ -52,7 +51,10 @@ function addAssetsToStream(paths, files) {

// Get relative file paths and join with search paths to send to vinyl-fs
globs = filepaths
.filter(isRelativeUrl)
.filter(function (url) {
// test if url is relative
return !/^(?:\w+:)?\/\//.test(url);
})
.map(function (filepath) {
paths.filepath = filepath;

Expand All @@ -76,7 +78,7 @@ function addAssetsToStream(paths, files) {
});

// option for newLine in gulp-concat
if (options.hasOwnProperty('newLine')) {
if (Object.prototype.hasOwnProperty.call(options, 'newLine')) {
if (options.newLine === ';' && type === 'css') {
options.newLine = null;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/addHtmlToStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function (file, data) {
var self = this;

try {
file.contents = new Buffer(data);
file.contents = Buffer.from(data);
self.push(file);
} catch (err) {
self.emit('error', new PluginError('gulp-useref', err));
Expand Down
Loading

0 comments on commit 98c621f

Please sign in to comment.