Coder Social home page Coder Social logo

Comments (4)

zensh avatar zensh commented on August 22, 2024 1

Try this:

gulp.task('new', function(callback) {
    gulpSequence('clean:all', ['favicons:all', 'images', 'fonts', 'site', 'sass', 'javascript', 'metalsmith'], 'watch')(callback);
});

gulp.task('clean:all', function() {
  return del(config.delete.build).then(function () {
    return del(config.delete.deploy);
  });
});

from gulp-sequence.

karland avatar karland commented on August 22, 2024 1

I am sorry, there were some really stupid errors. I forgot the return statements. So no way of knowing for gulpSequence that these tasks were completed:

gulp.task('revision', function () {

    var revAll = new RevAll({
            dontRenameFile: config.revision.ignore
        });

    return gulp.src(config.revision.src)
        .pipe(revAll.revision())
        .pipe(gulp.dest(config.revision.dest));

});   

gulp.task('gzip', function() {
    return gulp.src(config.gzip.src)
        .pipe(gzip())
        .pipe(gulp.dest(config.gzip.dest));
});

from gulp-sequence.

karland avatar karland commented on August 22, 2024

Perfect. This is fixing it. Thanks a lot.

from gulp-sequence.

karland avatar karland commented on August 22, 2024

I have a similar problem, so I do not open a new issue. I thought maybe you want to know. Each of the tasks work fine when started manually but only clean:deploy and revision are carried out when part of gulpSequence:

// cleans deploy-directory, puts revisioned files into deploy-directory,
// deletes debug infos from deploy directory and gzips respective files 
// in the deploy-directory
gulp.task('deploy', function(callback) {
    gulpSequence('clean:deploy',
                 'revision',
                 'clean:debug',
                 'gzip')(callback);
});

// deletes deploy-diretory
gulp.task('clean:deploy', function() {
  return del(config.delete.deploy);
});

// deletes debug infos from deploy-directory
gulp.task('clean:debug', function() {
  return del(config.delete.debug);
});

// runs revision over all files from build directory and puts result into deploy directory
gulp.task('revision', function () {

    var revAll = new RevAll({
            dontRenameFile: config.revision.ignore
        });

    gulp.src(config.revision.src)
        .pipe(revAll.revision())
        .pipe(gulp.dest(config.revision.dest));

});

// gzip's most files in deploy-directory 
gulp.task('gzip', function() {
    gulp.src(config.gzip.src)
    .pipe(gzip())
    .pipe(gulp.dest(config.gzip.dest));
});

The reason is that the tasks clean:debug and gzip are started although the task revision is not really finished yet writing the files and therefore they do not find files. Of course, I can find a workaround, but this seems to be a general issue and it would be nice if gulp-sequencewould handle it. What do you think?

from gulp-sequence.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.