Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

install-changed

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-changed

Only npm installs if package.json has been modified

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.5K
decreased by-24.19%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 26 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc