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

postcss-xml-transform

v0.1.0

Published

A tiny transform library that lets you write CSS using XML

Downloads

2

Readme

postcss-xml-transform

A tiny transform library that lets you write CSS using XML

Usage

const postcss = require('postcss');
const xss = require('./parser');

postcss()
	.process(css, { parser: xss })
	.then(function(result) {
		console.log(result.content);
	});

Use xss as a parser.

Why?

If i'm being completely honest this sort of begun as a jokey idea and then evolved into an exploration of of postcss works on the inside and how to write transforms for it and such

What can I use this library for?

Imagine this, you hold a senior position at a company you hate. You write up a compelling case for css in xml, something about the Android developers having an easier time with this because android uses xml. Probably. Nobody in your company really cares enough about the Android app to even know do they. You lead a team for two months to rewrite the entire CSS stack in this abhorrent XML thing. It should actually work with css modules and stuff. Hell you could even write a jsx pragma. You leave. Retire to the Bahamas for a bunch of months. The company you hated all along now has to maintain this. You sip a strawberry mojito in the beach and pet a bird. Things are good. You made it.

Is there like a spec or anything?

Hahahsahjbddsvufbf of course not I already had enough trouble rationalizing how separate the parsers for the declaration xml and the root xml should be to bother writing anything up.

Please refer to the test page or to the three files of code that i refactored so thoroughly that everything is now an abstract mess nobody can follow. I don't even know how this works. it's amazing. i love it.

Can I use the stringify method?

No.

Can I donate to help support development of this project?

I will donate to your project if you use this.

Are you aware XSS already stands for Cross Site Scripting?

Yes but THAT should actually be called css. it's not ny fault whatever commitee came up with that name wanted to sound 'radical' or 'extreme' because their legal guardians didnt get them those sneakers with built in rollerblades. Once this project gains traction I will submit as formal proposal to rename cross site scripting to css as it always should have been called

But what about the existing CSS then?

I asked alexa for cascade synonyms and she says we should use waterfalling style sheets. WSS. There, fixed.