lix-website/themes/lix/assets/bootstrap/node_modules/specificity/bin/specificity
2024-04-26 22:49:34 -06:00

15 lines
405 B
JavaScript
Executable file

#!/usr/bin/env node
// CLI uses CommonJS require to support older versions of Node.js
var specificity = require('../dist/specificity'),
selector = process.argv[2],
result;
if (selector) {
result = specificity.calculate(selector)[0];
console.log(result.specificity);
} else {
console.log('Usage: specificity <selector>');
console.log('Computes specificity of a CSS selector.');
process.exit(1);
}