javascript - How can I use gulp concat with a mix of remote and local files? -
this not working well:
gulp.task('dev', function () { console.log('concatenating development libs...') var log = function (file, cb) { console.log(file.path); cb(null, file); }; var zocialcss = 'zocial-flat.css'; request('http://my.blob.core.windows.net/shared-styles-webfonts/zocial-flat.css') .pipe(fs2.createwritestream(zocialcss)); var cssfiles = [ './' + zocialcss, '../bower_components/**/bootstrap.css', ]; fs.src(cssfiles) .pipe(map(log)) .pipe(concat('styles.css')) .pipe(gulp.dest(stylespath)); });
my guess fs2.createwritestream(zocialcss)
keeps file locked (or open writing) , never closes, concat
ignores (or silently fails). can see zocial-flat.css
being generated expected (i would, way, delete file after concatenation).
i have seen alternatives approach (like gulp-remote-src
) , open such suggestions.
Comments
Post a Comment