Detalhes do pacote

install-optional

kmalakoff19.4kMIT1.0.9

Install and remove optional dependencies

install, remove, optional, dependencies

readme (leia-me)

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