install-optional
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

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

Package Sidebar

Install

npm i install-optional

Weekly Downloads

7,047

Version

1.0.7

License

MIT

Unpacked Size

44.8 kB

Total Files

53

Last publish

Collaborators

  • kmalakoff