Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Support omission of leading _ for partials
const resolved = tryAccess(scssPath) ||
tryAccess(path.join(path.dirname(scssPath), `_${path.basename(scssPath)}`));
return {file: resolved || url};
}
return {file: url};
}
// Verify that the Sass compiles when we ask for all features.
sass.renderSync({
file: path.join(__dirname, 'feature-targeting-select-all.scss'),
importer: materialImporter,
});
// Verify that the Sass produces no CSS when we ask for no features.
const result = sass.renderSync({
file: path.join(__dirname, 'feature-targeting-select-none.scss'),
importer: materialImporter,
});
const css = result.css.toString('utf8').trim();
if (css.length > 0) {
console.error('All rules within applicable packages must be feature-targeted, but the following were not:');
console.error(css);
process.exit(1);
}