I have some js and html files in my folder and I want to verify that no js file or html file contains http:// For the js files I used gulp-contains and it worked perfectly but it's not working for html pages. I want any gulp module that will verify that no script is referring to http:// Means if html contains <script src="http://cdn...." then it should throw an error and should only work if script is referring to https.
Here is what I have tried:
gulp.task('IsHttpExists', function () {
    gulp.src(['scripts/*.js', 'pages/*.html'])
        .pipe(contains({
            search: 'http://',
            onFound: function (string, file, cb) {
                console.log(file.path);
                var sFile = require('path').parse(file.path).base;
                var error = 'The file "' + sFile + '" contains "' + string + '"';
                cb(new gutil.PluginError('gulp-contains', error));
            }
        }))
});
so is this possible using gulp-if or some other gulp module?