kyu08 / fzf-make

A command line tool that executes make target using fuzzy finder with preview window.
MIT License
83 stars 9 forks source link

Support some JavaScript package manager like npm, pnpm, yarn and bun #315

Open kyu08 opened 3 weeks ago

kyu08 commented 3 weeks ago

Requirements

TODO(Before this enhancement)

kyu08 commented 3 weeks ago

AsIs

pub enum AppState<'a> {
    SelectTarget(SelectTargetState<'a>),
    ExecuteTarget(Option<String>),
    ShouldQuit,
}

ToBe

pub enum AppState<'a> {
    SelectTarget(SelectTargetState<'a>),
    ExecuteTarget(Option<Command>), // Change to Command
    ShouldQuit,
}

pub trait Command {
    fn print(&self); // Print command to run like `make run` before execute it.
    fn execute(&self);
}