run-install-scripts

v0.0.5arrow_drop_down
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
380
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
834 B
run a given list of node_modules install scripts
1 contributor
Install run-install-scripts as a package?
Copied
npm i @bit/bit.packages.run-install-scripts
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
chevron_left
chevron_right

run-install-scripts

Given a list of npm-like package folders and their install scripts, will run all scripts.

Usage

const { runInstallScripts } = require('@bit/bit.packages.run-install-scripts')

async function main () {
  try {
    const installScripts = {
      '/tmp/foo/node_modules/package1': {
        install: './scripts/foo.sh'
      },
      '/tmp/foo/node_modules/package2': {
        postinstall: './scripts/bar.sh'
      },
      '/tmp/foo/node_modules/package3': {
        install: 'echo "please donate"',
        postinstall: './scripts/bar.sh'
      }
    }
    await runInstallScripts(installScripts)
    console.log('all scripts ran successfully')
  } catch (e) {
    console.log('some scripts failed:', e)
  }
}

main()
Help and resources