Move to workspace

This commit is contained in:
SkyfallWasTaken 2024-07-09 20:46:45 +01:00
parent c20ee0e575
commit b729259092
8 changed files with 28 additions and 14 deletions

View file

@ -0,0 +1,11 @@
[package]
name = "dinopkg-cli"
version = "0.1.0"
edition = "2021"
[dependencies]
clap = { version = "4.5.9", features = ["derive"] }
color-eyre = "0.6.3"
owo-colors = "4.0.0"
reqwest = "0.12.5"
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }

View file

@ -0,0 +1,19 @@
use clap::{Parser, Subcommand};
pub mod run;
#[derive(Parser)]
#[command(version, about, long_about = None)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand)]
pub enum Command {
/// Run a script in package.json
Run {
/// The name of the script to run
script_name: Option<String>,
},
}

View file

@ -0,0 +1 @@
pub async fn run(script_name: Option<String>) {}

View file

@ -0,0 +1,12 @@
use clap::Parser;
mod command;
use command::{Cli, Command};
#[tokio::main]
async fn main() {
let cli = Cli::parse();
match cli.command {
Command::Run { script_name } => command::run::run(script_name).await,
}
}

View file

@ -0,0 +1,6 @@
[package]
name = "dinopkg-package-json"
version = "0.1.0"
edition = "2021"
[dependencies]

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}