Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

gulp task problem - polybuild task was terminated but build files are not there #10

Open
duongphuhiep opened this issue Oct 16, 2015 · 0 comments

Comments

@duongphuhiep
Copy link

var expect = require('gulp-expect-file');
var polybuild = require('polybuild');

gulp.task('gen', function () {
    gulp.src('index.html')
        .pipe(polybuild({maximumCrush: true}))
        .pipe(gulp.dest('_gen/'));

        //Here I expect polybuild was finished and the file index.build.html is ready in my _gen folder; 
       //and here I want to rename it to index.html and put it to my _prod folder

    gulp.src('_gen/index.build.html')
        .pipe(expect('_gen/index.build.html')) //failed! polybuild is not done yet!
        .pipe($.rename('index.html'))
        .pipe(gulp.dest('_prod')); //nothing will be put into the _prod folder
});

Polybuild do the job, but I guess after polybuild, we have to 'sleep' some time to have the index.build.html ready. right? It is a issue for me

@duongphuhiep duongphuhiep changed the title gulp task problem - polybuild task was terminated but build files is not there gulp task problem - polybuild task was terminated but build files are not there Oct 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant