Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
/ require-install Public archive

Automatically install non-installed Node packages when you require them

License

Notifications You must be signed in to change notification settings

maikelvl/require-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Require Install

Require install enable you to automatically install packages when you require them. Very usefull for keeping your productivity high.

There is no performance lost (other than loading this package of course) because require-install at very first tries to require() your package the usual way.

Installation

Global

npm install -g require-install

or local

npm install --save require-install

Usage

var require_install = require('require-install');

// Just replace your require() with require_install():
var the_package = require_install('the-package');

// If it can't require it, it will install it and add it to your dependencies

the_package.doSomething();

Specific version

When a package is not available it will install the package according to the ./package.json. It will look up the version number if it exists. Else it will just install the latest and add it to the dependencies.

Silence!

If you wish to require-install packages without output, add the following to your package.json:

"require-install": {
    "silent": true
}

License

Copyright (c) 2016 Maikel Vlasman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Automatically install non-installed Node packages when you require them

Resources

License

Stars

Watchers

Forks

Packages

No packages published