Thursday 20 April 2017

gulp.dest stops after copying 48 files

I am using the following task but it stops copying after 48 files every time. If I have less than 48 files in the src directory it will copy them all ok.

var config      = require('../config');
var gulp        = require('gulp');
var swig        = require('gulp-swig');
var browsersync = require('browser-sync');
var glob        = require('glob');


/**
 * Task: HTML Compile
 */
gulp.task('html-compile', function() { htmlCompile(); });

function htmlCompile(production) {
    var swigOpts = {
        defaults: {
            cache: false,
            locals: {
                production: !!production
            }
        },
        data: {
            baseUrl: '../'
        }
    };

    return gulp.src(config.html.src.templates)
        .pipe(swig(swigOpts))
        .pipe(gulp.dest(config.html.dist.base))
        .pipe(browsersync.reload({ stream: true }));

}

I am using the following version numbers in the package.json

"gulp": "^3.9.0",
"swig": "^1.4.2",
"vinyl-file": "^1.2.1",
"browser-sync": "^2.11.0"

I have also tried removing the swig and browsersync lines and it gives the same results.

Can anyone see where I am going wrong?



via user2248441

No comments:

Post a Comment