0.1.2 • Published 10 years ago

yolorequire v0.1.2

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

Yolorequire

Tired of your awesome webscale app crashing because of dependancies missing from package.json? Then look no further than yolorequire!

Yolorequire turns this...

var express = require('express');

---------------------------------

module.js:340
    throw err;
    ^
Error: Cannot find module 'express'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/home/matti/Projects/JS/yolorequire/test.js:1:77)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:457:10)

into this!

require('yolorequire')(['--save', '--save-exact']);
var express = require('express');

---------------------------------

Looks like module express was not found! Installing...

<NPM OUTPUT>

And everything is installed and just works again! No biggie!

Tips and tricks

You can pass command line parameters to npm either as an array of strings or a single string!

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago