Gulp inject not working

后端 未结 1 1318
耶瑟儿~
耶瑟儿~ 2021-01-21 13:39

I\'m try to use gulp-inject to inject some files into a PHP file. This is not working. I tried using HTML as well but that isn\'t working. The output in my console says \"gulp-i

相关标签:
1条回答
  • 2021-01-21 14:34

    The files were injected...but just in memory ! You actually have to pipe the result to a file :

    gulp.task('build',function() {
        return gulp.src("src/test.html")
        .pipe(inject(gulp.src("src/vendor/js/*.js")))
        .pipe(gulp.dest('./dist')); // or .src/ or whatever
    });
    

    There are other examples in the readme

    0 讨论(0)
提交回复
热议问题