This is not working very 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 is fs2.createWriteStream(zocialCss)
keeps the file locked (or open for writing) and it never closes, so concat
ignores it (or silently fails). I can see zocial-flat.css
being generated as expected (I would, by the way, like to delete the file after concatenation).
I have seen alternatives to this approach (like gulp-remote-src
) and am open to any such suggestions.