UNPKG

atlas-guide

Version:

Atlas is living style-guides & pattern library static site generator with extensive CSS monitoring and components info that could be used virtually with any scss/css project

33 lines (27 loc) 671 B
'use strict'; function totalsDeclarations(stats) { let totals = []; const totalProperties = [ 'width', 'height', 'position', 'float', 'margin', 'padding', 'color', 'background-color' ]; totalProperties.forEach(property => { const prop = stats.declarations.properties[property]; totals.push({ name: property.replace('-', ' '), count: prop ? prop.length : 0 }); }); totals.push({ name: 'font size', count: stats.declarations.getAllFontSizes().length }); return totals; } module.exports = totalsDeclarations;