switchdev 0.1.0

A fast CLI to instantly switch between development projects and run their startup commands
1
2
3
4
5
6
7
8
9
10
11
12
use crate::config::Project;
use crate::detector;

pub fn resolve_command(project: &Project) -> Option<String> {
    if let Some(cmds) = &project.commands {
        if !cmds.is_empty() {
            return Some(cmds.join(" && "));
        }
    }

    detector::detect_command(&project.path)
}