JSPM

  • Created
  • Published
  • Downloads 5413
  • Score
    100M100P100Q108987F
  • License MIT

Install and remove optional dependencies

Package Exports

  • install-optional
  • install-optional/package.json

Readme

install-optional

Install and remove optional dependencies

import { install, installSync, removeSync } from 'install-optional';

// removes all optional dependencies with @esbuild/ in their name
removeSync('esbuild', '@esbuild/');

// removes all optional dependencies for this platform - sync
installSync('esbuild', `${process.platform}-${process.arch}`);

// removes all optional dependencies for this platform - async
await install('esbuild', `${process.platform}-${process.arch}`)

Documentation

API Docs