Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(commonOptions).forEach(function(opt) {
options[opt] = commonOptions[opt];
});
processor
.process(css, options)
.then(function(result) { fn(null, result); })
.catch(fn);
}
async.waterfall([
async.apply(fs.readFile, input),
doProcess,
async.apply(dumpWarnings),
async.apply(writeResult, output)
], fn);
}
from: input,
to: output
};
Object.keys(commonOptions).forEach(function(opt) {
options[opt] = commonOptions[opt];
});
processor
.process(css, options)
.then(function(result) { fn(null, result); })
.catch(fn);
}
async.waterfall([
async.apply(fs.readFile, input),
doProcess,
async.apply(dumpWarnings),
async.apply(writeResult, output)
], fn);
}
function writeResult (name, content, fn) {
var funcs = [
async.apply(fs.writeFile, name, content.css)
];
if (content.map) {
funcs.push(async.apply(fs.writeFile, name + '.map', content.map.toString()));
}
async.parallel(funcs, fn);
}
};
Object.keys(commonOptions).forEach(function(opt) {
options[opt] = commonOptions[opt];
});
processor
.process(css, options)
.then(function(result) { fn(null, result); })
.catch(fn);
}
async.waterfall([
async.apply(fs.readFile, input),
doProcess,
async.apply(dumpWarnings),
async.apply(writeResult, output)
], fn);
}
function writeResult (name, content, fn) {
var funcs = [
async.apply(fs.writeFile, name, content.css)
];
if (content.map) {
funcs.push(async.apply(fs.writeFile, name + '.map', content.map.toString()));
}
async.parallel(funcs, fn);
}