gulp-inline-source icon indicating copy to clipboard operation
gulp-inline-source copied to clipboard

Breaks on google verification files

Open pesochek opened this issue 7 years ago • 0 comments

'use strict';

const gulp = require('gulp');
const inline = require('gulp-inline-source');

gulp.task('inline', () => {
    return gulp.src('dist/**/*.html')
        .pipe(inline({
            compress: false
        }))
        .pipe(gulp.dest('dist'));
});

Throws an error when finding file like google0b725740ac54caf0.html - it is used to confirm website ownership in Google Webmaster dashboard. Content is just one line, something like: google-site-verification: google0b725740ac54caf0.html And here is the error itself:

[12:51:52] Starting 'inline'...

events.js:154 throw er; // Unhandled 'error' event ^ Error: ENOENT: no such file or directory, open '/home/pesochek/docker-lm/google-site-verification: google0b725740ac54caf0.html' at Error (native)

Can be fixed by defining gulp.src this way, but it doesn't seem to be correct, shouldn't such files be simply ignored by gulp-inline-source itself? ['dist/**/*.html', '!dist/**/{google,y_key_}*.html']

pesochek avatar Mar 23 '18 05:03 pesochek