npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

csstestbattery

v0.0.2

Published

A bunch of HTML+CSS files for testing CSS transforms

Downloads

8

Readme

A bunch of real-life CSS and their HTML for testing CSS transform tools

Lashing out the action, returning the reaction
Weak are ripped and torn away
Hypnotizing power, crushing all that cower
Battery is here to stay

~ Metallica, Battery

Why

Tools. Transpilers. Pre/post processors. Testing. How do you know what you've done works?

Installation

$ npm install csstestbattery

Usage

Crushing all deceivers, mashing non-believers
Never ending potency

~ Metallica, Battery

First you run your transforms, reading from /before dirs and writing to /after. Then:

var obsession = require('csstestbattery');
obsession.assert();

The tests assertions will be run using the CSSDiff project

Help finding CSS files to transform

If you need a little help when running your transforms, try the getLocations() method. It gives you an array of before/after locations. E.g.

var insanity = require('csstestbattery');
var loco = insanity.getLocations();
loco.forEach(function(l) {
  console.log(l.before);
  console.log(l.after);
  
  // your transform l.before -> l.after goeth here
});

// all done? Check

insanity.assert();

See also /examples/mensch.js for an example of a real transform (prettification with the Mensch parser) followed by a check.

Contribute

Libs

If you see a nice CSS library that should be added to the battery of tests, follow these steps:

  • Take an HTML file that uses the library (preferably as extensively as possible) and copy it to /data/libraries/html, e.g. /data/libraries/html/bootstrap.html
  • Take a CSS with the same filename and copy to /data/libraries/before, e.g. /data/libraries/html/bootstrap.css

No images, fonts, etc, just CSS and HTML. Also strip any <link>, <style> and <script> tags, although these will likely be stripped by the test runner.

CSSZenGarden

If CSSZenGarden's files need an update, run

$ node scripts/zengarden.js

Alexa top 100

If you want to update the Alexa top 1000 sites, first grab a fresh copy of the list from http://httparchive.org/urls.php, copy to /scripts/alexa1000.txt. Then run

$ node scripts/alexa.js

Give it a minute. You'll also need phantomjs somewhere in your path.

License

This is a public domain project. All yours.

It contains files downloaded from "the wild" in the /data directory. No comments were stripped, so if there are any licenses, required by the original authors, they should be in the files. I honestly don't know how that works, so ask someone who does before you use anything from the /data directory.