Git Product home page Git Product logo

borisbelmar / deerwatcher Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 90 KB

Powerful and simple tool for develop with local packages. DeerWatcher will watch your local packages and run your command when any changes are detected, restarting the process, like nodemon does.

Home Page: https://www.npmjs.com/package/deerwatcher

Shell 0.67% JavaScript 1.09% TypeScript 98.24%
javascript nodejs npm tool

deerwatcher's Introduction

DeerWatcher

Powerful and simple tool for develop with local packages. DeerWatcher will watch your local packages and run your command when any changes are detected, restarting the process, like nodemon does.

Warning: This project is under development and is not yet ready for production. This documentation is also WIP and may not be up to date with the current state of the project and may change in the future.

Installation

npm install --save-dev deerwatcher

# or

yarn add --dev deerwatcher

Configuration

Need to setup a configuration file in your project root.

# Create a configuration file
touch deerwatcher.json

Add the following configuration to your file, in packages you can add the packages that you want to watch, the key is the package name and the value is the local path to the package.

{
  "command": "node ./server.js",
  "packages": {
    "@mypackage/hello-world": "path/to/project",
    "@mypackage/hello-world2": {
      "path": "path/to/project",
      "ignore": ["src"]
    }
  }
}

CLI

You can use deerwatcher in your package.json scripts or run it directly in your terminal.

{
  "scripts": {
    "dev": "deerwatcher"
  }
}

Importing DeerWatcher in your code

You can import DeerWatcher in your code and use it as a library. If second argument is not provided, DeerWatcher will try to load the configuration from deerwatcher.json file.

const DeerWatcher = require('deerwatcher');

DeerWatcher.startWatchers(
  () => {
    console.log('Package changed');
  }
  {
    '@mypackage/hello-world': 'path/to/project',
    '@mypackage/hello-world2': {
      path: 'path/to/project',
      ignore: ['src']
    }
  }
)

deerwatcher's People

Contributors

borisbelmar avatar

Watchers

 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.