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

cleat

v0.1.3

Published

A command line tool to modify web pages. Stay in your happy place.

Downloads

3

Readme

cleat

A command line tool to modify web pages. Stay in your happy place.

You do everything from the command line. Then why spoil your perfect setup with vim or emacs if you just want to make some simple edits?

installation

sudo npm -g cleat

basics

cleat use index.html text "h1" "this is a header"

cleat use index.html add ".p" "<i>hi</i>" add ".p" "<b>also this</b>"

cleat use "*.html" css ".p" "color" "red"

You can use JQuery style selectors like ".class" and filenames with wildcards like "*.html" if you use ".

shell

You can open up a shell with:

cleat open "*.html"

command list

default

Sets the text to

<!DOCTYPE html>
<html lang="en">
	<head>
	</head>
	<body>
	</body>
</html>
add <query, html>

Will add html at the end of anything that matches query. Identical to append.

prepend <query, html>

Will add html at the beginning of anything that matches query.

append <query, html>

Will add html at the end of anything that matches query.

addClass <query, class>

Will add the class class to anything that matches query.

removeClass <query, class>

Will remove class from anything that matches query.

remove

Will delete query.

after <query, html>

Will insert html after anything that matches query.

before <query, html>

Will insert html before anything that matches query.

attr <query, attribute, value>

Will change the attribute attribute of query to value. Useful for changing the id of items.

removeAttr <query, attribute>

Will remove attribute from query.

toggleClass <query, class>

If query has class, it will be removed. Otherwise, it will be added.

replaceWith <query, html>

Replaces query with html.

css <query, property, val>

Changes property of query to val.

stylesheet

Adds a <link rel="stylesheet" href="<href>"> to the head of the file.

script

Adds a <script src="<src>"></script> to the end of the body of the file.

text

Changes the inner text of query to text.

other

-o: displays the changed files after they are changed.

--help: help text