Giter VIP home page Giter VIP logo

rewatch's Introduction

Rewatch

Watch and execute command.

Install

Install rewatch with npm:

$ npm install rewatch -g

Usage

It is pretty simple, get the help menu:

$ rewatch -h
Usage:
    rewatch [files..] -c "[command]"

Options:
    -c, --command=<command>   a shell command
    -i, --interval=[ms]       interval micro seconds
    -d, --delay=[ms]          delay to execute command
    -s, --signal=[signal]     kill child process with signal
    -v, --version             print the version of vc
    -h, --help                display this message

Examples:
    $ rewatch *.js foo.css -c "make build"
    $ rewatch *.js foo.css -c "make build" -i 500

Changelog

2014-08-20 0.4.0

Remove -e option. Add -s option for kill child process.

$ rewatch *.js -c "node ./server.js" -s "SIGTERM"

2014-08-20 0.3.0

Fix global leak for subprocess. Add option -d and -e.

2014-02-09 0.2.2

Console.log the command.

2014-01-22 0.2.1

Bugfix for toNumber.

2014-01-22 0.2.0

Support for windows. Add options interval.

2014-01-22 0.1.1

Bugfix for context closure.

2014-01-22 0.1.0

First version.

License

MIT

rewatch's People

Contributors

chemzqm avatar lepture 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

Watchers

 avatar  avatar  avatar  avatar

rewatch's Issues

给命令传个文件名参数如何

比如我用 tiny-lr 通知前端文件变化刷新的时候,如果传递的是 css 文件名,那么浏览器只会重载css,而不是完全刷新,这样不用每次改css还需要手工走流程,调试的时候会更友好一些。是否可以添加一个参数比如

 rewatch *.js *.css -c 'curl -X POST http://localhost:35729/changed -d \'{ "files": "$file" }\''

执行 curl 的时候 $file 会变为改变的文件名。

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.