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

css-inliner-cli

v1.1.3

Published

A simple CLI wrapper for the CSS Inliner package.

Downloads

10

Readme

CSS Inliner CLI

A simple CLI wrapper for the CSS Inliner package.

Install

npm install css-inliner-cli

Usage

css-inliner --help
Usage: css-inliner-cli [options] <input>

Options:
  -V, --version                       output the version number
  -E, --extension <regex>             extension regex (default: "\\.([^.]+)$")
  -R, --replacement <string>          extension replacement (default: ".css.$1")
  -T, --template <handlebars|jinja2>  templating language to use
  -e, --encoding <format>             encoding of the input file (default: "utf-8")
  -d, --debug                         toggle debugging information
  -h, --help                          display help for command

The aim of this package is to be as compact and simple as possible. Some assumptions are therefore made regarding its use case. Most importantly, it is required that one or more files are selected using a glob pattern. Each match should be a file in order to be inlined.

For convenience, any pattern within each matched files can be replaced by some string. In the default configuration, the specified input <filename>.<ext> is inlined with any referenced CSS stylesheets. The result is written to <filename>.css.<ext>.

Notes

Make sure that you put the input argument in quotes to ensure that the shell does not run away with your magic variables, such as the wildcard *.

When using the --replacement or -R option, make sure to prepend any back references to capture groups in the extension regex with a backslash.