Giter VIP home page Giter VIP logo

linkmon's Introduction

linkmon

NPM link monitor CLI utility

linkmon monitoring directories

About

Monitor and display NPM-linked project dependencies in the terminal. Watches directories and displays linked projects so you can keep track of what is linked where.

Why? I frequently find that some operations result in npm stripping my linked modules and replacing them with copies from the registry, which can be very frustrating during development across multiple libraries. This project provides aid by showing you all links so you can keep track of what is linked where.

linkmon can also notify you when a linked dependency becomes unlinked!

Installation

Install by running npm install -g linkmon, if you intend on using it as a CLI utility. Install it for use within a project by running npm install linkmon --save.

Usage

linkmon id designed as a CLI utility first:

Usage: linkmon [options] [arguments]

    Watch a directory:
        linkmon ~/programming/projects
    Watch multiple directories, with notifications:
        linkmon /Users/lucy/git ~/temp/my-project --notify
    Custom watch interval (30 seconds):
        linkmon some-dir --interval=30

Options:
    --interval=             Watch interval, in seconds, for monitoring
                            the provided project directories. Defaults
                            to 15 seconds.
    --notify                Enable operating-system notifications. Is
                            disabled by default. Requires a GUI such
                            as Mac OS or Windows.

Arguments:
    Provide one or more directories for scanning and monitoring. A
    directory can either contain one or more further directories that
    house NodeJS projects, or can be a NodeJS project itself. A
    directory is classified as a NodeJS project if it contains a
    package.json file and a node_modules directory.

NodeJS API

linkmon can be used as a NodeJS API as well:

const { scanLinks } = require("linkmon");

(async function() {
    const links = await scanLinks("../");
    // links look like the following:
    // {
    //     parent: "my-lib",
    //     parentVersion: "0.3.4",
    //     linkedPackage: "@company/package",
    //     linkedPackageVersion: "5.3.12",
    //     link: "/Users/joe/work/package-dev",
    //     path: "/Users/joe/work/my-lib"
    // }
})();

linkmon's People

Contributors

perry-mitchell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

linkmon's Issues

-v and --version

Version output support. Add both -v and --version flags to output version information. Can function similarly to the help output feature - The application should exit after the version information is output.

If run, the following output is expected:

$ linkmon -v
v0.1.1
$ linkmon --version
v0.1.1

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.