GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - doowb/watch-cli: Watch files and execute an npm script when files change.

BranchesTags
Open more actions menu

Latest commit

 

History

28 Commits
28 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.jshintrc
.jshintrc
 
 
.travis.yml
.travis.yml
 
 
.verb.md
.verb.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 
test.js
test.js
 
 

Repository files navigation

watch-cli NPM version

Command line wrapper for gaze to use in package.json scripts object.

Install globally

Install globally with npm

npm i -g watch-cli

Usage

watch -p "**/*.js" -c "npm test"

Options

Short Long Type Description
-p --pattern string glob pattern you are want to watch.
-c --command string Command to execute on watched files change.

Multi Patterns

It is possible to provide multi paterns, so if one of the files changed, the command will execute.

watch -p file1.js -p file2.fs -c command

Exported environment variables

Environment variables available from the command string:

FILENAME           Relative filename.
ABSOLUTE_FILENAME  Asolute filename.
EVENT              Event type. Is either 'changed', 'deleted' or 'added'.

Use it like this in Linux/macOS:

$ watch -p '**/*.js' -c 'jshint $FILENAME'

In Windows:

> watch -p "**/*.js" -c "jshint %FILENAME%"

Author

Brian Woodward

  • github/doowb
  • twitter/doowb

License

Copyright (c) 2015 Brian Woodward
Released under the MIT license


This file was generated by verb-cli on March 11, 2015.

About

Watch files and execute an npm script when files change.

Topics

file-watcherwatchwatcher

Resources

Readme
MIT license
Activity

Stars

60 stars

Watchers

3 watching

Forks

10 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.