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

@hn3000/argus

v0.2.4

Published

file watcher, can watch multiple patterns, run multiple targets

Downloads

2

Readme

Argus: project watcher runs npm run scripts

Conveniently watch several directories / patterns at the same time and trigger the appropriate npm run scripts.

Could probably be done simply using 'watch', but I'm too lazy to write a watch-filter function. While chokidar-cli can be used to run a single command when a change is matched, this tool can watch several patterns at the same time and run different tools for each set of patterns.

Different tools will not be run in parallel, so that it is easier to interpret the output of the tools.

Examples

The command

$ argus src -r tsc **/*.sass -r sass

will run npm run tsc for any changes to files in src and npm run sass for changes in sass files (having names that end in .sass).

Multiple patterns can be given for the same run script:

$ argus src/**/*.ts src/**/*.tsx -r tsc

You can also ignore stuff:

$ argus src !**/*.js -r tsc

will ignore changes to js files.

Commandline syntax

$ argus <global options> [<patterns...> -r <cmd> ]+

Patterns

Patterns supported are the extended wildcards understood by chokidar. Patterns starting with an exclamation point "!" are used as ignored patterns.

Command to run

  • -r <cmdsuffix>, --run <cmdsuffix>: command to run if one of the preceeding patterns matches a changed file, gets appended to the basecmd (npm run by default).

Global options

  • n, --dry-run: don't run npm run, just echo command instead of running it
  • t <ms>, -throttle <ms>: throttle change events to less than one per number of milliseconds given (Default is no throttle.)
  • -d <ms>, --debounce <ms>: debounce change events to occur only after the given number of milliseconds has passed without further changes. (Default debounce time is 1500 milliseconds. Specify 0 to disable.)
  • -b <basecmd>, --basecmd <basecmd>: base command, default is 'npm run', will be prepended to whatever is given as -r
  • -r <cmd>, --run <cmd>: command to run if a change was detected, every set of patterns must be followed by this option