Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gazer-color

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gazer-color

Watch some files, do a thing - a gazer fork capable of color output

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

A Gazer fork capable of color output

Watch some files, do a thing

A simple wrapper for Shama's gaze module that performs an arbitrary command when files change. Like watchify, but for everything.

Installation

$ npm install --save-dev gazer-color
# or
$ npm install -g gazer-color

Usage

$ gazer-color --pattern README.md -- echo blorp
# note the -- between the gazer-color arguments like --patern and the command and its arguments

[README.md changes]

> blorp

Multiple patterns

gaze accepts an array of patterns, so do gazer-color.

gaze(['**/*.js', '!node_modules/**/*'], function() {
  console.log('blorp');
});
$ gazer-color --pattern "**/*.js" --pattern "!node_modules/**/*" -- echo blorp

[index.js changes]

> blorp

Arbitrary watch tasks with npm run

If you haven't read substack's post describing lightweight build steps with npm run, I'll give you a moment to get up to speed.

Here's how you might use gazer-color to run a build task every time a file changes:

{
  "scripts": {
    "test": "mocha",
    "watch-test": "gazer-color -p \"public/less/**/*.less\" -- npm run test"
  }
}

And then start the watcher:

$ npm run watch-less

Keywords

FAQs

Package last updated on 11 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc