Potentially interesting stats on stylesheets.
git clone https://github.com/cssstats/cssstats
cd cssstats
yarn
yarn start
open http://localhost:8000
MIT
Moved to monorepo
Home Page: https://github.com/cssstats/cssstats/tree/master/packages/cssstats
I think we could add selector type counts to the aggregates object. I'm thinking the more useful selector types would be:
feature request : get the selector associated with a rule size.
it could allow us to detect selectors that are too specialised.
very usefull lib by the way :) love it !
This should be a separate repo and package, but just keeping note here for now.
I've found the plugin will list the same color multiple times if the way it is declared is changed (short names, upper case, lower case, three digit hex, six digit hex and rgb).
Ex on http://cssstats.com/stats?url=http%3A%2F%2Fconsumerfinance.gov
Reducing these to single entries would highlight the more accurate divides between the total and unique declarations.
How are folks using cssstats in an automated, CI environment? I'd love to integrate this into my gulp build that gets run on Jenkins. I could get a consumable report I could point to which is always up to date, similar to our code coverage reports, ESLint statistics, etc.
But I'm not sure how to do it; every approach I can think of has some limitations.
Right now running the gulp task & generating JSON doesn't help visualize the way we'd want. The cssstats-webapp requires a node server to be running, while we'd prefer static HTML. And I don't think there are any Jenkins or other CI plugins that know how to consume the JSON report.
Are you aware of anyone who's doing this well?
Related: this issue makes it look like there's some interest in an HTML report.
Currently cssstats.com errors out on a few urls like thegrid.io. This appears to be occurring on the css-statistics level.
Itβd be handy to export the number of animations in your CSS file (from @keyframes
) β some stylesheets include a whole animation library and seeing the number of animations would help people remember the weight of them.
Consider adding in functions from the app's controller.
This will output a stats summary to stdout. (Default is false, of course)
@jxnblk when you get a chance could you please publish 1.2.0
or add me to the npm package?
Thank you!
getcss thegrid.io > tmp.css
cssstats file tmp.css
CSS Statistics CLI (0.0.1)
CSS Statistics encountered an error reading tmp.css
[RangeError: Invalid string length]
I feel like it'd be useful to include an averageSpecificity
metric to the returned object, as it could useful to illustrate the overall health of a project's CSS and its specificity. I also think it'd be a very worthwhile data point on cssstats.com. Thoughts?
Example Usecase: scss test.scss | cssstats
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.