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

lews

v1.1.0

Published

Watches and compiles less

Downloads

1

Readme

Lews

Little Lews compiles all your Less files and and keeps track of their @imports

Why you need it

You, Lenny, have these Less files with the following imports:

bundle.less
\_ fonts.less
|  \_ icons.less
|_ buttons.less
|  \_ helpers.less
|_ helpers.less

Say you edit helpers.less, Lews will compile helpers.less, buttons.less and bundle.less. Should you edit icons.less, Lews will compile icons.less, fonts.less and bundle.less.

Pretty neat, right?

Features

  • Compiles all Less files that imports the changed Less file recursively
  • Gulp-support
  • Experimental socket-support - compiles filename sent through a socket. This is useful when working over NFS.

Usage examples

Cli:

Usage: lews [options] sourcePath [destPath]
    --no-source-map: dont inline source maps
    --use-socket [socketPath]: listen on socket for files to compile
    --no-watch: don't watch for file changes
    --watch-interval interval: specify watch interval
    --help / --usage: this help message

Gulp:

var gulp = require('gulp'),
    Lews = require('lews');

gulp.task('dev', function() {
    var lews = new Lews('css', 'public/css');
    gulp.watch(['css/**/*.less'], lews.gulpWatchCb.bind(lews));
});

With sockets and Vim: (useful then working over NFS)

lews --use-socket /srv/www/testsite/lews.sock --watch-interval 3000 /srv/www/testsite/css /srv/www/testsite/public/css
autocmd BufWritePost /srv/www/testsite/css/*.less silent !echo -ne '<afile>:p' | nc -U /srv/www/testsite/lews.sock