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 🙏

© 2026 – Pkg Stats / Ryan Hefner

licss

v0.2.3

Published

A Gulp plugin for processing styles with support for .css, .scss, .sass, and .pcss files. It uses minification, autoprefixing, and removes unused CSS styles.

Readme

licss

Gulp plugin for processing styles with support for .css, .scss, .sass, and .pcss files. Optimizes, minifies, and removes unused CSS via PurgeCSS integration. Supports Bootstrap and other frameworks. Optimized for Bootstrap 5.3+ (uses Dart Sass 1.99.0)

Features

1. Compiler Selection

Uses either Sass/SCSS (Embedded Sass Host) for compilation and LightningCSS (from Parcel) for minification.

All file types support style imports via @import.

Deprecation warnings silenced: The following Sass compiler deprecations are automatically silenced: import, color-functions, global-builtin, legacy-js-api, if-function

2. Minification + Autoprefixer

LightningCSS handles CSS concatenation and minification, including automatic vendor prefixing based on browserslist.

3. PurgeCSS Integration

Removes unused CSS via PurgeCSS. PurgeCSS configuration is provided via the purgeCSSoptions option. Refer to the PurgeCSS documentation for details.

4. Source Map Management

Generates or updates source maps for debugging (controlled by Gulp's sourcemaps flag). Normalizes paths in source maps for cross‑platform consistency.

5. Validation & Error Handling

Validates file extensions, compiler/post‑processing options, and load paths. Throws descriptive errors for unsupported inputs.

6. File Renaming

The plugin includes a rename utility for flexible file naming:

  • basename – replace the entire file name (including extension)
  • extname – change the file extension (e.g., .css)
  • suffix – add a suffix before the extension (e.g., .min)

The utility is compatible with gulp‑rename and can be used in the same pipeline.

Quick Start

Installation

pnpm add -D licss

or

npm install --save-dev licss

or

yarn add -D licss

Basic Usage

// import modules
import { dest, src } from "gulp";
import { licss, rename } from "licss";
// sample task for CSS files
function styles() {
  return src(["src/styles/main.css"], { sourcemaps: true })
    .pipe(
      licss({
        purgeCSSoptions: {
          content: ["src/*.html", "src/scripts/*.ts"],
        },
        verbose: true, // display processing progress messages
      }),
    )
    .pipe(rename({ suffix: ".min", extname: ".css" }))
    .pipe(dest("dist/css", { sourcemaps: "." })); // for external source maps
  // or `{ sourcemaps: true }` for inline source maps
}
// export
export { styles };

Configuration

Options

interface LicssOptions {
  minify?: boolean | undefined;
  loadPaths?: string[] | undefined;
  purgeCSSoptions?: UserDefinedOptions | undefined;
  verbose?: boolean | undefined;
}

Default Values

{
    minify: true,
    loadPaths: [dirname(file.path), join(file.cwd, 'node_modules')],
    purgeCSSoptions: undefined,
    verbose: false,
}

Examples

Processing CSS Files

import { src, dest } from "gulp";
import { licss } from "licss";

function css() {
  return src(["src/styles/*.css"], { sourcemaps: true })
    .pipe(licss({ minify: false }))
    .pipe(dest("dist/css", { sourcemaps: "." }));
}

Processing Sass/SCSS with PurgeCSS

function sass() {
  return src(["src/sass/*.{sass,scss}"], { sourcemaps: true })
    .pipe(
      licss({
        minify: false,
        purgeCSSoptions: {
          content: [
            "src/**/*.html",
            "src/assets/scripts/**/*.ts",
            "node_modules/bootstrap/js/dist/**/*.js",
          ],
          safelist: [/show/],
          keyframes: true,
        },
      }),
    )
    .pipe(rename({ suffix: ".min", extname: ".css" }))
    .pipe(dest("dist/css", { sourcemaps: "." }));
}

Processing PostCSS Files

function pcss() {
  return src(["src/pcss/styles/main.pcss"], { sourcemaps: true })
    .pipe(
      licss({
        purgeCSSoptions: {
          content: ["src/pcss/*.html", "src/assets/scripts/**/*.ts"],
        },
      }),
    )
    .pipe(rename({ suffix: ".min", extname: ".css" }))
    .pipe(dest("dist/css", { sourcemaps: true }));
}

Processing SCSS with Minification

function scss() {
  return src(["src/scss/style.scss"])
    .pipe(licss())
    .pipe(rename({ basename: "main.min.css" }))
    .pipe(dest("dist/css"));
}

Types

The plugin exports the following TypeScript types:

import type { LicssOptions, RenameOptions, UserDefinedOptions } from "licss";
  • LicssOptions – options for the licss() function
  • RenameOptions – options for the built‑in rename() function (compatible with gulp‑rename)
  • UserDefinedOptions – PurgeCSS options type (re‑exported from purgecss)

Project Scripts

  • pnpm test – run Vitest tests
  • pnpm lint – lint code with oxlint
  • pnpm fix – automatically fix lint issues
  • pnpm check – check code formatting without changes
  • pnpm fmt – format code with oxfmt
  • pnpm validate – run lint and TypeScript type check
  • pnpm typecheck – TypeScript type check only
  • pnpm tsc – alias for typecheck
  • pnpm dev – build in watch mode
  • pnpm build – build TypeScript to JavaScript

License

MIT License ©2026 by pasmurno from llcawc. Made with for beautiful architecture.