Skip to content
disclose scripts running on `npm install`
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
fixtures
.gitignore
LICENSE
README.md
bin.js
index.js
package-lock.json
package.json
test.js

README.md

install-scripts

This package is to disclose scripts running on npm install.

npm install --save-dev install-scripts

CLI

# install dependencies without running scripts
% npm install --ignore-scripts
% npx install-scripts
fsevents
  scripts:
    install: node install
  paths:
    node_modules/fsevents/package.json
puppeteer
  scripts:
    install: node install.js
  paths:
    node_modules/puppeteer/package.json
styled-components
  scripts:
    postinstall: node ./scripts/postinstall.js || exit 0
  paths:
    node_modules/styled-components/package.json

// or
% npx install-scripts path/to/project/node_modules

Node API

const installScripts = require("install-scripts");
(async () => {
  const result = await installScripts(target);
  Object.values(result).forEach(({ paths, scripts, name}) => {
    console.log(name, scripts, paths);
  });
})();
You can’t perform that action at this time.