[][src]Function sliderule::remove

pub fn remove(target_dir: &Path, name: &str) -> SROutput

Removes a component (local or remote) from the project directory structure.

target_dir must be a valid Sliderule component directory. name must be a valid name for a component in either the components or the node_modules directories.

Examples


// Remove a local component so we can test it
let output = sliderule::remove(&test_dir.join("toplevel"), "level1");

// Make sure that the level1 directory was removed
assert!(!&test_dir
        .join("toplevel")
        .join("components")
        .join("level1")
        .exists());