Code Monkey home page Code Monkey logo

watchexec-simple's Introduction

Usage

watchexec-simple is a simpler alternative for the existing watchexec project. It doesn't implement nearly all the features that the full watchexec project provides. However, it provides the core functionality in a codebase that is much smaller (at last count, 5%). It is built on the same notify library, itself built by the same authors as watchexec. watchexec-simple installs to the same binary name as the watchexec project.

Here is a simple example of using watchexec-simple:

watchexec -- cargo run

Comparison to watchexec

When possible, watchexec-simple relies on the same option names as watchexec. The key differences are:

  1. For watchexec-simple, positional arguments are watched paths, and -- is required and used to separate the command. For watchexec, positional arguments are the command, and each path requires a -w to be passed in. For example:
# watchexec-simple
watchexec src/ data/ .env -- cargo run

# watchexec
watchexec -w src/ -w data/ -w .env cargo run
  1. By default, watchexec-simple restarts the process, even if it is actively running. For watchexec, the user is required to pass the -r option. Example:
# watchexec-simple
watchexec -- cargo run

# watchexec
watchexec -r cargo run
  1. watchexec-simple does not run the command in a shell. If you want a shell, use something like: watchexec -- /bin/bash -c 'command'. By default, watchexec runs all commands in a shell.

Installation

cargo install watchexec-simple

watchexec-simple's People

Contributors

kurtbuilds avatar

Watchers

 avatar  avatar

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.