mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2025-05-01 01:29:30 +00:00
Move to workspace
This commit is contained in:
parent
c20ee0e575
commit
b729259092
8 changed files with 28 additions and 14 deletions
11
crates/dinopkg-cli/Cargo.toml
Normal file
11
crates/dinopkg-cli/Cargo.toml
Normal 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"] }
|
19
crates/dinopkg-cli/src/command.rs
Normal file
19
crates/dinopkg-cli/src/command.rs
Normal 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>,
|
||||
},
|
||||
}
|
1
crates/dinopkg-cli/src/command/run.rs
Normal file
1
crates/dinopkg-cli/src/command/run.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub async fn run(script_name: Option<String>) {}
|
12
crates/dinopkg-cli/src/main.rs
Normal file
12
crates/dinopkg-cli/src/main.rs
Normal 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,
|
||||
}
|
||||
}
|
6
crates/dinopkg-package-json/Cargo.toml
Normal file
6
crates/dinopkg-package-json/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "dinopkg-package-json"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
3
crates/dinopkg-package-json/src/main.rs
Normal file
3
crates/dinopkg-package-json/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue