[−][src]Function sliderule::remove_remote_component
pub fn remove_remote_component(
target_dir: &Path,
name: &str,
cache: Option<String>
) -> SROutput
Removes a remote component via the name.
target_dir
must be a valid Sliderule component directory.
name
name of the component to remove. The node_modules directory is assumed, so name conflicts
with local components are ignored.
'cache` Allows a user to specify a temporary cache for npm to use. Mostly for testing purposes.
Examples
let output = sliderule::remove_remote_component( &test_dir.join("toplevel"), "blink_firmware", Some(cache_dir.to_string_lossy().to_string()), ); assert_eq!(0, output.status); assert!(!test_dir .join("toplevel") .join("node_modules") .join("blink_firmware") .exists());