Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function updateBrowserslist() {
console.log(chalk.whiteBright('Checking browserslist'));
console.log();
const data = browserslist.readConfig(BROWSERSLIST_PATH);
const production = browserslist(null, {
env: 'production-template',
config: BROWSERSLIST_PATH,
});
const d = diff.diffArrays(data.production, production);
d.forEach(part => {
// green for additions, red for deletions
// grey for common parts
if (part.added) {
console.log(chalk.green(part.value.join('\n')));
} else if (part.removed) {
console.log(chalk.red(part.value.join('\n')));
} else {
console.log(chalk.grey(part.value.join('\n')));
}
async function loadBrowserslist(asset, path) {
let config = await asset.getConfig(['browserslist', '.browserslistrc'], {
path,
load: false,
});
if (config) {
return browserslist.readConfig(config);
}
}
async function loadBrowserslist(asset, path) {
let config = await asset.getConfig(['browserslist', '.browserslistrc'], {
path,
load: false
});
if (config) {
return browserslist.readConfig(config);
}
}
const path = require("path");
module.exports = require("browserslist").readConfig(
path.join(__dirname, "../browserslist")
).defaults;