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

esthetic

v0.6.4-beta.1

Published

Æsthetic ~ Language beautification support leveraging the Sparser lexing algorithm.

Downloads

6,149

Readme

WIP ~ WORK IN PROGRESS

The new generation code beautification tool for formatting HTML, Liquid, CSS/SCSS, JavaScript, TypeScript and more! Æsthetic leverages the Sparser lexing algorithm and its parse approach has been repurposed from the distributed source of the late and powerful PrettyDiff.

Documentation

Documentation lives on æsthetic.dev

Features

  • Fast, performant and lightweight (50kb gzip).
  • Format, parse and language detection capabilities.
  • Provides a granular set of beautification rules.
  • Supports 10+ different front~end facing languages.
  • Uniformed data structures with incremental traversal.
  • Simple and painless integration within existing projects.

Installation

Æsthetic is supports both CJS/ESM environments and also provides basic CLI support.

PNPM
pnpm add esthetic
YARN
yarn add esthetic
NPM
npm install esthetic --save
CDN
https://unpkg.com/esthetic

Usage

Consult the documentation for a better understanding.

CLI
$ esthetic <file> --flag
ESM
import esthetic from 'esthetic';

esthetic.format('...', { /* rules */ })
CJS
const esthetic = require('esthetic');

esthetic.format('...', { /* rules */ })

Contributing

Looking to contribute? Æsthetic leverages pnpm so ensure you're using it as your package manager. Development is intended to be conducted within the vscode text editor. Fork or clone the project and install dependencies.

Testing / Development

Æsthetic uses the powerful AVA test runner together with a small helper utility that helps alleviate some of the complexities involved with testing tools of its criteria. It's recommended that you develop in a two pane terminal. The dev.test.mjs and dev.txt files are core to testing and working on the module, they will be called when running pnpm play

Commands

The following commands are available as executable scripts.

pnpm dev         Bundles module with ESBuild (via tsup) in watch mode
pnpm play        Starts up AVA in development mode and runs the dev.txt
pnpm build       Generates the distribution bundles
pnpm pack        Packages the module up for distribution on NPM registry
pnpm test        Runs all the tests
pnpm tests       Cherry pick test cases to run

Consult the tests readme for more information on test prefixed commands

Acknowledgements

Æsthetic owes its existence to Sparser and PrettyDiff. This project has been adapted from these 2 brilliant tools and while largely refactored + overhauled the original parse architecture remains intact.

PrettyDiff and Sparser

Æsthetic is made possible because of the Austin Cheney who is the original author of Sparser and PrettyDiff. Austin is one of the great minds in JavaScript and I want to thank him for open sourcing these tools.

Both PrettyDiff and Sparser were retired in 2019 after a nearly a decade of production. Austin has since created Shared File Systems which is a privacy first point-to-point communication tool. Please check it out and also have a read of wisdom which personally helped me become a better developer.

Author 🥛 Νίκος Σαβίδης

Follow me on Twitter or shoot me an Email.