by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nathan Querido
    @nfquerido_gitlab
    if that doest work, do you have another suggestion?
    Eric
    @sliceofbytes
    well the exception is pretty clear, gulp is showing up as undefined so gotta figure out why gulp is undefined
    obviously src etc.. are defined since your tasks were running
    I gues you could just try importing lastRun like you did for src, dest etc..
    Nathan Querido
    @nfquerido_gitlab
    Eric
    @sliceofbytes
    Ya, I would just stick with the older syntax, no real need to refactor
    const {gulp, src, dest, watch, series, parallel, lastRun} = require('gulp')
    try that and remove the gulp before lastRun
    Nathan Querido
    @nfquerido_gitlab
    Thanks yeah, trying that
    return src(paths.source + paths.styles.source, {since: lastRun(<is it the task name?>)})
    what do I reference in lastRun?
    ah
    Eric
    @sliceofbytes
    Ya, you would wrap your return in a function, then reference the function in your watch
    Nathan Querido
    @nfquerido_gitlab
    Thanks a million, experimenting
    Damien Retzinger
    @damienwebdev
    @sliceofbytes I have two functions:
    const func1 = () => {
      return getRootPackage().then((rootPackage) => src(RELEASE_CONFIG.DIST + '/*/package.json')
        .pipe(
          through2.obj(function(file, _, cb) {
            ...
            cb(null, file);
          })
        )
        .pipe(dest(RELEASE_CONFIG.DIST))
      )
    }
    
    const func2 = () => {
      return getRootPackage().then((rootPackage) => src(RELEASE_CONFIG.DIST + '/*/package.json')
        .pipe(
          through2.obj(function(file, _, cb) {
            ...
            cb(null, file);
          })
        )
        .pipe(dest(RELEASE_CONFIG.DIST))
      )
    }
    
    export const s = series(
      func1, 
      func2
    );
    Since these modify the same file in place, I have a race condition that appears to occur where func2 is being called while func1 is still writing into its file.
    My understanding was that in gulp4, returning the promise/stream would cause the task to only proceed to the next task when the prior one resolved.
    But, it appears that "writing" is not complete because this pair of tasks intermittently succeeds when run in series. Any ideas?
    Damien Retzinger
    @damienwebdev
    I've also tried the async/await versions of the tasks, but without success.
    Eric
    @sliceofbytes
    @damienwebdev I'm not positve but it looks like you might be mixing the promise return style with the error first callback style
    Andy Bayer
    @anderoonies
    hey all, i'm having a weird issue where a task's dependency is being run, and is completing, but the task which depends on it is never running. i've confirmed the dependency is returning the stream
    Andy Bayer
    @anderoonies
    issue with merge stream
    Andy Bayer
    @anderoonies
    has anyone used tasks that have mergeStreams as dependenceis? should be trivial but is not working
    Andy Bayer
    @anderoonies
    a task with dependencies works when it's run by itself (gulp taskname), but when running a task which depends on it it doesn't even start
    John Manko
    @johnmanko
    Is there a way to avoid Starting '<anonymous>' when using shell.task, like exports.ngBuild = series(shell.task(...))
    I'd like the task to be named, instead of "anonymous"
    Ghost
    @ghost~5a453497d73408ce4f852d60
    @johnmanko name the function or leverage the displayName property.
    Marc Guilera
    @marcguilera
    hey
    i would like to use gulp with objects (ie config) and not files. is it possible to create an object stream?
    Ghost
    @ghost~5a453497d73408ce4f852d60
    @marcguilera how do you mean? You want Gulp to build upon and extend upon an existing object?
    Behrang
    @behrangsa

    Any ideas why this doesn't print console output?

    'use strict';
    
    import { exec } from 'child_process';
    import { task } from 'gulp';
    
    task('build', function(cb) {
      exec('bundle exec jekyll serve --incremental', function(err, stdout, stderr) {
          console.log(stdout);
          console.log(stderr);
          cb(err);
      });
    });

    CLI version: 2.2.0
    Local version: 4.0.2

    Pablo Rubiano
    @pcrubianoa
    hello, good evening!

    How is it possible to overwrite a file?

    .src ('js / main.js')
    .pipe (process ...)
    .pipe (gulp.dest ('js / main.js'));

    *gulp 3
    Jentan Bernardus
    @jentanbernardus
    @pcrubianoa Maybe you should look into gulp-replace
    Mahmoud Zakaria
    @mahmoudZakaria90
    Hey guys, a new CLI for generating webpack/gulp starter config file
    https://www.npmjs.com/package/bundler-plate
    Enjoy!
    Joelsz
    @Joelsz
    Hi all! I'm using Gulp's gulp.lastRun() for incremental builds with the watcher. How can I trigger a rebuild for the whole module where the current changed file is part of? In other words, how can I add more files to the src based on the current file's path? I tried using gulp.src() within a custom through2 stream, but for some reason the stream never ends. Any help would be appreciated.
    Mher Shahinyan
    @Shahinyanm
    Hi guys, how to do this so that the imported CSS code only affects the #editor ID. Thanks
    #editor {
        // Import Bulma
        @import "~bulma";
    
        // Import Buefy;
        @import '~buefy/dist/buefy.css';
    
        // Import Functions
        @import "functions.scss";
    }
    Wang Shidong
    @wsdjeg

    hello, I just finish the tasks support in SpaceVim, but failed to run gulp tasks in windows os, so whats is the command of gulp task in command line.

    https://spacevim.org/documentation/#tasks

    sblucas97
    @sblucas97

    Hey guys, how are you?
    Can someone help me with this issue?
    https://stackoverflow.com/questions/60763886/cant-run-angular-1-project-on-ubuntu

    Basically I'm trying to run an Angular project with Gulp in linux distributions and I'm getting some errors. It's an old project and it's has been kind of annoying to solve that.

    Ben Lu
    @blukiwibird_twitter
    Not sure if this is the right place for this, was wondering is I can pass a flag or something so that when I have a gulpfile.ts, I can run gulp ts-node with transpile only so that it doesn't spend 5 seconds typechecking my project every time
    Fingerprintt
    @Fingerprintt
    Hey there! I'm sorry it sure seems quite inappropriate to reach out with a collaboration given this unpredictable crisis
    Still, the time for this meaningful opportunity is now - re-imagining CPAAS, taking it to another level with actual considerations for data privacy
    Since touching on Gulp, the best fit is a truly passionate, skilled DEV with ambitions for a lead role. Very interested in touching base with you (I'm afraid got no DEV bkgd :)). Even if entirely unrelated, feel free to reach out
    ZBAGI
    @ZBAGI

    Hi i have problem with my task:

    function eslinting() {
        return new Promise(async (resolve, reject) => {
            log("Eslinting");
            exec(`eslint ./src/**/*`, (error, stdout, stderr) => {
                if (error || stderr) {
                    reject("test");
                } else
                    resolve(stdout);
            });
        });
    }
    
    exports.build = gulp.series(
        gulp.parallel(
            clean,
            eslinting
        ),
        gulp.parallel(
            buildLayers,
            compileTypescript,
            installDependencies
        )
    );

    reject("test"); is thrown but because it is in gulp.parallel i getting:

    [15:58:50] The following tasks did not complete: build
    [15:58:50] Did you forget to signal async completion?
    C:\Users\ZBAGI\GIT\Clubhub\api-serverless\node_modules\async-done\index.js:18
        throw err;
        ^
    
    Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ uid: 0,
      name: '<parallel>',
      branch: true,
      error:
       { Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ uid: 2,
         name: 'eslinting',
         branch: false,
         error: 'test',
         duration: [ 1, 679123000 ],
    When doing exports.build = eslinting
    It works fine, and correctly throws an error. But when doping it in parallel, the paraller wraps it in own error that is not correctly handled ? Any idea ?
    ZBAGI
    @ZBAGI
    Just to visualize problem:
    function example() {
        return new Promise((resolve, reject) => {
            reject("error message");
        });
    }
    
    exports.incorrectErrorThrown = gulp.series(example, example)
    exports.correctErrorMsg = example
    [16:48:51] Starting 'correctErrorMsg'...
    [16:48:51] 'correctErrorMsg' errored after 3.09 ms
    [16:48:51] Error: error message
    [16:49:52] Starting 'incorrectErrorThrown'...
    [16:49:52] 'build' errored after 6.3 ms
    [16:49:52] Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ uid: 0,
      name: 'example',
      branch: false,
      error: 'error message',
      duration: [ 0, 1544500 ],
      time: 1588603792682 })
    Andrius Solopovas
    @asolopovas
    Guys isn't anyone of you annoyed about the chrome console bug where "selected context only" setting does not persist, doesn't it bother you when you get error messages from plugins rather than from application you develop? Can at least a few of you vote for this to be fixed?
    https://bugs.chromium.org/p/chromium/issues/detail?id=901863