Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var getFile = function(filePath) {
filePath = 'test/' + filePath;
return new gutil.File({
path: filePath,
cwd: 'test/',
base: path.dirname(filePath),
contents: null
});
};
function endStream() {
var generatedCss = tailor.generateLazy(options);
var cssContent = options.minifyOutput ? generatedCss.minified : generatedCss.formatted;
var outputFile = new gutil.File({
cwd: firstFile.cwd,
base: firstFile.base,
path: path.join(firstFile.base, options.filename),
contents: new Buffer(cssContent)
});
this.push(outputFile);
this.emit('data', outputFile);
this.emit('end');
}
reporters.forEach(function(opts) {
if (typeof opts === 'string') opts = { reporter: opts };
var reporter = opts.reporter || 'html';
var outfile = opts.outFile || 'coverage.' + reporter;
file = new gutil.File({
base: path.join(__dirname, './'),
cwd: __dirname,
path: path.join(__dirname, './', outfile),
contents: new Buffer(cover.reporters[reporter](data.coverage))
});
file.coverage = data.coverage;
this.push(file);
}, this);
cb();
public writeFile(path: string, content: string): void {
this.addFile(new File({
path,
contents: new Buffer(content)
}));
}
finish: through.obj(pass, function (callback) {
var file = new gutil.File(filespec);
file.contents = new Buffer(log);
this.push(file);
process.stdout.write = orig;
log = '';
orig = null;
callback();
})
};