detect-invalid-requires

0.1.11 • Public • Published

Build Status

-- Defunct --

Notice: This repository is no longer worked on

Please use valiquire - it more fully supports node module paths (including folder and absolute paths).



Simple utility to detect invalid relative require paths that do not exist. It is case-sensitive, so in particular it is useful when developers are all on case insensitive dev machines (OSX and Windows), yet CI server is Linux.

Usage

CLI

install globally via

npm install -g detect-invalid-requires

run via

detect-invalid-requires [options] (files)

Options

-i, --ignore list Comma delimited list of path strings to ignore

Example

detect-invalid-requires -i thirdparty,3rd .

API

detector(path: String, options: Object = {}, callback: Function(files:Array[{file, path}]))

Example

var detector = require('detect-invalid-requires')
 
detector('./some/path', options, function (invalids) {
    invalids.forEach(function (invalid) {
        console.error('File ', invalid.file, ' contains required module that cannot be found ', invalid.path);
    })
})

Readme

Keywords

none

Package Sidebar

Install

npm i detect-invalid-requires

Weekly Downloads

2

Version

0.1.11

License

ISC

Last publish

Collaborators

  • justinjmoses