2.0.4 • Published 10 years ago

jut v2.0.4

Weekly downloads
22
License
MIT
Repository
github
Last release
10 years ago

jut

Build Status npm install

locate used modules

installation

npm install -g jut

whafor?

jut -m badmodule

or use it with jung and a test runner!

jung -f '\.js$' -- test_runner $(ls tests/**/*.js | jut -m '$JUNG_FILE' -Fnj)

or something else. the world is yours.

usage

jut [options] --module <modulename>

Options are:

  • --module, -m <modulename> Find files that require <modulename>
  • --dir, -d <dirname> Search files in <dirname> recursively
  • --file, -f <filename> Search <filename> for modules
  • --justmatch, -j Just print the filename that matches
  • --fullpath, -F Print full path to matched file
  • --require, -r <name> Specify a different function name from require
  • --nocolor, -n Don't colorize results
  • --version, -v Print current version
  • --help, -h Print help

notes

in order to support searching for "deep-requires", (such as module-name/sub-module) searching for a "local" file (such as ../../module-name/sub-module) requires a leading ./ in the module name.

as a module

jut(['array', 'of', 'module', './names'], ['aliases']) -> DuplexStream

stream it filenames, and get out objects with match objects. something like:

var jut = require('jut')
  , ls = require('ls-stream') // for example
  , convert = require('dotpath-stream')
  , filter = require('stream-police')

ls('apps')
  .pipe(convert('path')) // reduce ls-stream object to path string
  .pipe(filter(function(data) {
    return /\.js$/.test(data.toString()) // only js files
  }))
  .pipe(jut(['falafel'])) // right over to jut
  .on('data', function(data) {
    console.log(data) // {filename: fullpath, line: lineNumber, module: 'falafel'}
  })

license

MIT

2.0.4

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago

0.0.0

12 years ago