Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onLast prevents task completing #94

Open
benfrain opened this issue Sep 14, 2015 · 0 comments
Open

onLast prevents task completing #94

benfrain opened this issue Sep 14, 2015 · 0 comments

Comments

@benfrain
Copy link

I'm unsure if this is my own lack of understanding. I'm using onLast to send a notify when a task completes on a bunch of files. Here is the relevant task:

var sourceCSS = "preCSS/**/*.css";
var outputCSS = "css/"

gulp.task("styles", function () {

    //PostCSS related
    var postcss = require("gulp-postcss");
    var postcssImport = require("postcss-import");
    var autoprefixer = require("autoprefixer");
    var simpleVars = require("postcss-simple-vars");
    var mixins = require("postcss-mixins");
    var nested = require("postcss-nested");
    //Utils
    var gutil = require("gulp-util");
    // var rename = require("gulp-rename");
    var notify = require("gulp-notify");

    var processors = [
    postcssImport({ glob: true }),
    mixins,
    simpleVars,
    nested];

    return gulp.src(sourceCSS)

    // We always want PostCSS to run
    .pipe(postcss(processors).on("error", gutil.log))

    // Set the destination for the CSS file
    .pipe(gulp.dest(outputCSS)

    // Notify me
    //.pipe(notify({
    //    "onLast": true,
    //    "title": "Styles built from preCSS",
    //    "message": "Boom-chikka-wha-wha"
    //}))
    );

});

However, with the piped notify un-commented I get the notify but not all the files in the job are processed (some files in the preCSS/ folder don't make it to the css folder).

Unsure if this is an issue with my usage of onLast or an actual bug. Using Windows 7, Gulp v3.9.0, node v0.12.7, gulp-notify v 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant