Git Product home page Git Product logo

make-watch's Introduction

make-watch

Build Status npm version npm downloads MIT

Continuously run Make in watch mode


Attention - This project isn't completed yet. Feel free to contribute with code, tests or documentation.


Motivation

Sometimes while developing we want to recompile a file or rerun all tests when something changes. make-watch allows you to run a make command automatically everytime that one of its dependency changes. How? make-watch analyzes your Makefile and extracts a dependency graph, so it can watch all and only the interested files. You no longer need to manually run commands if you change a file or the Makefile itself.

Installation

You can install make-watch using npm:

npm install --save-dev make-watch

or, if you prefer, you can install make-watch globally with:

npm install -g make-watch

Usage

Once you have installed make-watch, you can use it from the command line. Just replace make with make-watch. Here is an example:

# make
make-watch

# make target1.exe target2.exe
make-watch target1.exe target2.exe

# make target1.exe target2.exe
# also watch .cpp files in src and lib dir except config.cpp
# this is useful if you want to recompile your app
# when you create a new file for example
make-watch target1.exe target2.exe -I "src","lib" -x ".cpp" -i "config.cpp"

Options

Option Default Description
-V, --version output the version number
-I, --include <files_and_dirs> list of additional files and directoris to watch
-x, --extensions <extensions> list of extensions to hook into
-i, --ignore <regex> ignore all additional files and directories that match this regex
--no-makewatchrc whether or not to look up .makewatchrc
-h, --help output usage information

makewatchrc

Instead of cli options, you can use a .makewatchrc json file, here is an example:

{
  "include": ["src", "lib"],
  "extensions": [".cpp"],
  "ignore": "ignore.cpp"
}

make-watch will lookup to a .makewatchrc in the current directory. If one does not exist, it will travel up the directory tree trying to find it.

Change Log

This project adheres to Semantic Versioning.
Every release, along with the migration instructions, is documented on the Github Releases page.

Authors

Matteo Basso

Copyright and License

Copyright (c) 2017, Matteo Basso.

make-watch source code is licensed under the MIT License.

make-watch's People

Contributors

mbasso avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.