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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wlessc

v0.9.0

Published

Watch, compile, prefix and minify .less/.css files

Downloads

84

Readme

wlessc

wlessc is a simple command line tool to quickly watch and compile .less files when you don't have time or just don't want to set up a grunt/gulp/whatever build task for that (or worse, doing lessc style.less > style.css after every change).

You will have your output .css file in the same directory, with the same base name -just like GUI tools do by default.

It uses the output from LESS to find @import'ed files and watches those too, so it's not that dumb.

Installation

npm install -g wlessc

Usage

wlessc [<input>] [--output <path>] [--prefix-browsers <expr>|--no-prefix]
		[--no-compact] [--compact-more] [--once]

Options

<input>                     Input file. It can be a LESS or CSS file.
                            If omitted, ./style.less is used.
--output <path>             Custom output file path.
--prefix-browsers <expr>    Comma-separated expressions to set custom
                            browser support.
                            See https://github.com/ai/browserslist.
--no-prefix                 Omit prefixing.
--no-compact                Omit minification and other optimizations.
--compact-more              Apply more level 2 optimizations from clean-css
--once                      Compile once and exit.

Examples

# Will watch ./style.less
wlessc

# Will watch path/to/style.less
wlessc path/to/style.less

# Will watch path/to/style.css, omitting LESS compilation
# and using .min.css as default output extension
wlessc path/to/style.css

# Will output to custom path/to/output.css
wlessc --output path/to/output.css

# Sets custom browser support for Autoprefixer
wlessc --prefix-browsers "last 1 version"
wlessc --prefix-browsers "last 5 version, > 1%"

# Turns off Autoprefixer
wlessc --no-prefix

# Turns off clean-css optimizations
wlessc --no-compact

# Applies level 2 optimizations from clean-css
wlessc --no-compact

# Turns off watching at all, exiting after compiling
wlessc --once

Change log

wlessc +0.3 uses the Autoprefixer library to add vendor prefixes to LESS output. This is on by default, but it can be tweaked or turned off.

wlessc +0.4.3 uses the cssnano library to remove whitespace and apply other optimizations to reduce file size.

wlessc 0.5.0 updates all of its dependencies, and makes sure cssnano optimizations don't mess with authored unit or color values.

wlessc 0.6.0 updates all of its dependencies, allows to be used with a plain CSS file for its Autoprefixer/cssnano goodies while skipping LESS compilation, and adds the --output switch.

wlessc 0.6.3 configures LESS with {relativeUrls: true}, so url() always resolves relative to the current file and not the entry file. It also does away with a PostCSS warning.

wlessc 0.7.0 updates all of its dependencies, changed its LESS syntax error message and includes startup messages (so it doesn't seem dead when running on slow machines).

wlessc 0.8.0 replaces cssnano with clean-css for CSS optimization. cssnano had many dependencies that reflected on wlessc's startup time. clean-css has an additional --compact-more switch, which applies further optimization.

wlessc 0.9.0 is rewritten from the ground up to use async/await, updates all of its dependencies and adds a --help switch.

Disclaimer

This was done out of necessity in daily work, and it just does what I need it to do. Don't expect much from it.