This repository contains some tooling that can be used to quickly obtain information about how websites use the U.S. Web Design Standards.
You'll need Node JS version 7.10 or greater.
npm install
node cache-sites.js
At this point, the front page of all sites that use the Standards
will be cached in the cache
directory. At this point you can
run queries, described below.
To find sites that are using bad gov banners, run:
node find-bad-govbanners.js
To find statistics about the usage of particular USWDS classes, run:
node find-usa-class-usage.js
Note that this only finds USWDS classes if they are namespaced via
the default usa-
prefix. If a website is using a custom build of
USWDS that changes this default prefix, its use of USWDS classes
won't be detected.
To clear your cached copies of the front pages of all Standards sites,
just delete the cache
directory, e.g. rm -rf cache
.
Then run node cache-sites.js
to re-populate the cache with the latest
version of each page.
The site list is stored in the WHO_IS_USING_USWDS.md
file in
the Standards repository. To change the version of the repository
used to obtain the list, change the uswds
dependency in package.json
.