Coder Social home page Coder Social logo

watch-cli's Introduction

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

License

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


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

watch-cli's People

Contributors

0xflotus avatar aminadav avatar doowb avatar grawl avatar laurelnaiad avatar thomasfl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

watch-cli's Issues

Document CLI

Hi,

thanks for the library โ€“ I was looking for this. I can't find any documentation for it though โ€“ have I missed something?

Comparison to chokidar

I think watch-cli is easier to find, but chokidar seems more mature. Maybe a note in the repo description pointing towards chokidar makes sense.

stdio loses color

Hi, thank you for this utility. I noticed that colors get lost in the commands it runs. I have a proposed fix, which I'll push/PR. Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.