Skip to content

kinland/install-changed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install-changed

This package is a quick and easy way of figuring out whether or not package.json has been modified. It executes npm install if the file has been modified, otherwise it does nothing.

Install

You can find this package on npm and can install it with npm install install-changed

Usage

You can use it as follows. In your package.json, add a new script to run:

  "scripts": {
    "pre-run": "install-changed",
    "other-scripts: "whatever.js"
  },

Then when you run npm run pre-run it will automatically figure out what needs to happen.

You can also do this programatically:

let installChanged = require('install-changed')

let isModified = installChanged.watchPackage()  

The function above does exactly the same thing, additonally it also returns a boolean value which you might find useful.

About

Tiny npm package that only runs npm install if package.json has been modified.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%