1.0.5 • Published 7 years ago

ls-require v1.0.5

Weekly downloads
28
License
VOL
Repository
github
Last release
7 years ago

ls-require

For each filename piped in, require it. Useful for running tape tests.

install

The normal npm way:

npm install ls-require

what it does

For every piped in filename, it will require(filename) it.

That's it.

But why?

Suppose you have a folder like this:

file1.spec.js
file2.spec.js

And those files were tape test files, and you wanted to run all of them:

ls *.spec.js | ls-require

Of course, right now you could do tape *.spec.js but tape doesn't have very expressive minimatch options. Therefore you could use something like globbit to get a list of filenames, and execute those as tape tests, like this:

globbit 'path/**/*.spec.js' '!path/**/old-*.spec.js' | ls-require

options

The only option currently available is that you can set the current working directory as the first and only property, e.g.:

ls ../*.spec.js | ls-require ../

This will require all the piped in files using require('../' + filename).

license

Published and released under the Very Open License.

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago