diff --git a/Cargo.toml b/Cargo.toml index 1bcee4c..8a1fd03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,43 @@ +[package] +name = "devmode" +description = "A project management utility for developers" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +repository.workspace = true +homepage.workspace = true +categories.workspace = true +keywords.workspace = true + +[dependencies] +libset = "0.1.2" +clap = { version = "3.2.14", features = ["derive"] } +anyhow = "1.0.44" +requestty = "0.4.1" +colored = "2.0.0" +regex = "1.5.4" +git2 = "0.14.4" +git2_credentials = "0.8.0" +cmd_lib = "1.1.0" +walkdir = "2.3.2" +serde = { version = "1.0.126", features = ["derive"] } +fs_extra = "1.2.0" +derive_setters = "0.1.6" +git-url-parse = "0.4.4" + +[workspace.package] +version = "0.1.0" +authors = ["Eduardo Flores "] +edition = "2021" +license = "MIT" +repository = "https://github.com/edfloreshz/devmode/" +homepage = "https://devmode.edfloreshz.dev/" +categories = ["development-tools"] +keywords = ["development", "utility"] +exclude = [".idea", ".github", ".vscode"] + [workspace] resolver = "2" -members = ["cli", "shared", "gui/slint", "gui/iced", "gui/egui"] +members = ["cli", "gui/slint", "gui/iced", "gui/egui", "gui/freya"] +# exclude = ["gui/freya"] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 03df666..dacddde 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "devmode" -version = "0.3.0" -edition = "2021" -license = "GPL-2.0" +name = "devmode-cli" description = "Devmode is a project management utility for developers." -homepage = "https://devmode.edfloreshz.dev/" -documentation = "https://docs.rs/devmode" -repository = "https://github.com/edfloreshz/devmode/" -readme = "README.md" -exclude = [".idea", ".github", ".vscode", "assets/img", "assets/scripts"] +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true +homepage.workspace = true +categories.workspace = true +keywords.workspace = true [[bin]] name = "dm" @@ -17,7 +17,7 @@ path = "src/main.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -devmode-shared = { path = "../shared" } +devmode = { path = "../" } libset = "0.1.2" clap = { version = "3.2.14", features = ["derive"] } anyhow = "1.0.44" diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 20c49b4..29bceb0 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -1,7 +1,7 @@ use anyhow::{bail, Context, Result}; use clap::{Parser, Subcommand}; use colored::Colorize; -use devmode_shared::action::Action; +use devmode::action::Action; use fs_extra::{dir, move_items}; use libset::routes::home; use regex::bytes::Regex; @@ -10,17 +10,17 @@ use std::fs; use std::path::PathBuf; use url_builder::URLBuilder; -use devmode_shared::constants::messages::*; +use devmode::constants::messages::*; use crate::input::{ clone_setup, config_all, config_editor, config_host, config_owner, fork_setup, overwrite, select_repo, }; -use devmode_shared::fork::ForkAction; -use devmode_shared::host::Host; -use devmode_shared::project::{create_paths_reader, find_paths, OpenAction}; -use devmode_shared::settings::Settings; -use devmode_shared::{clone::CloneAction, constants::patterns::GIT_URL}; +use devmode::fork::ForkAction; +use devmode::host::Host; +use devmode::project::{create_paths_reader, find_paths, OpenAction}; +use devmode::settings::Settings; +use devmode::{clone::CloneAction, constants::patterns::GIT_URL}; #[derive(Parser, Debug)] #[clap(name = "(Dev)mode", version = "0.3.0")] diff --git a/cli/src/input.rs b/cli/src/input.rs index b539f01..5cbd1f6 100644 --- a/cli/src/input.rs +++ b/cli/src/input.rs @@ -2,12 +2,12 @@ use std::{fs::remove_dir_all, path::PathBuf}; use anyhow::{bail, Context, Result}; use colored::Colorize; -use devmode_shared::application::Application; -use devmode_shared::clone::CloneAction; -use devmode_shared::editor::Editor; -use devmode_shared::fork::ForkAction; -use devmode_shared::host::Host; -use devmode_shared::settings::Settings; +use devmode::application::Application; +use devmode::clone::CloneAction; +use devmode::editor::Editor; +use devmode::fork::ForkAction; +use devmode::host::Host; +use devmode::settings::Settings; use requestty::{Answer, Question}; use url_builder::URLBuilder; diff --git a/gui/egui/Cargo.toml b/gui/egui/Cargo.toml index 5faf7a4..e1b2ddf 100644 --- a/gui/egui/Cargo.toml +++ b/gui/egui/Cargo.toml @@ -1,11 +1,17 @@ [package] -name = "egui" -version = "0.1.0" -edition = "2021" +name = "devmode-egui" +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true +homepage.workspace = true +categories.workspace = true +keywords.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] eframe = "0.25.0" catppuccin-egui = "4.0" -devmode-shared = { path = "../../shared" } +devmode = { path = "../../" } diff --git a/gui/egui/src/panels/preferences.rs b/gui/egui/src/panels/preferences.rs index 6752f29..f41d2c6 100644 --- a/gui/egui/src/panels/preferences.rs +++ b/gui/egui/src/panels/preferences.rs @@ -1,4 +1,4 @@ -use devmode_shared::{application::Application, editor::Editor, host::Host, settings::Settings}; +use devmode::{application::Application, editor::Editor, host::Host, settings::Settings}; use eframe::{ egui::{ComboBox, Response, TextEdit, Ui}, epaint::vec2, diff --git a/gui/freya/Cargo.toml b/gui/freya/Cargo.toml new file mode 100644 index 0000000..6fe33ef --- /dev/null +++ b/gui/freya/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "devmode-freya" +version = "0.1.0" +authors = ["Eduardo Flores "] +edition = "2021" +license = "MIT" +repository = "https://github.com/edfloreshz/devmode/" +homepage = "https://devmode.edfloreshz.dev/" +categories = ["development-tools"] +keywords = ["development", "utility"] +exclude = [".idea", ".github", ".vscode"] + +[dependencies] +freya = "0.1" +dioxus = { version = "0.4", features = [ + "macro", + "hooks", +], default-features = false } diff --git a/gui/freya/src/main.rs b/gui/freya/src/main.rs new file mode 100644 index 0000000..6d0fa91 --- /dev/null +++ b/gui/freya/src/main.rs @@ -0,0 +1,26 @@ +#![cfg_attr( + all(not(debug_assertions), target_os = "windows"), + windows_subsystem = "windows" +)] + +use freya::prelude::*; + +fn main() { + launch(app); +} + +fn app(cx: Scope) -> Element { + let mut count = use_state(cx, || 0); + + render!( + rect { + height: "100%", + width: "100%", + background: "rgb(35, 35, 35)", + color: "white", + padding: "12", + onclick: move |_| count += 1, + label { "Click to increase -> {count}" } + } + ) +} diff --git a/gui/iced/Cargo.toml b/gui/iced/Cargo.toml index 74fb505..329f068 100644 --- a/gui/iced/Cargo.toml +++ b/gui/iced/Cargo.toml @@ -1,11 +1,17 @@ [package] -name = "iced" -version = "0.1.0" -edition = "2021" +name = "devmode-iced" +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true +homepage.workspace = true +categories.workspace = true +keywords.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] iced = "0.10.0" strum = { version = "0.26.1", features = ["derive"] } -devmode-shared = { path = "../../shared" } +devmode = { path = "../../" } diff --git a/gui/iced/src/pages/preferences.rs b/gui/iced/src/pages/preferences.rs index 211a592..62f6253 100644 --- a/gui/iced/src/pages/preferences.rs +++ b/gui/iced/src/pages/preferences.rs @@ -1,4 +1,4 @@ -use devmode_shared::{application::Application, editor::Editor, host::Host, settings::Settings}; +use devmode::settings::Settings; use iced::widget::text; use crate::app::Message; diff --git a/gui/slint/Cargo.toml b/gui/slint/Cargo.toml index 4c40df4..1142baf 100644 --- a/gui/slint/Cargo.toml +++ b/gui/slint/Cargo.toml @@ -1,16 +1,21 @@ [package] -name = "devmode-gui" -version = "0.1.0" -authors = ["Eduardo Flores "] -edition = "2021" +name = "devmode-slint" build = "build.rs" +version.workspace = true +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true +homepage.workspace = true +categories.workspace = true +keywords.workspace = true [[bin]] name = "dmg" path = "src/main.rs" [dependencies] -devmode-shared = { path = "../../shared" } +devmode = { path = "../../" } git2 = "0.14.4" slint = "1.4" diff --git a/gui/slint/src/main.rs b/gui/slint/src/main.rs index 4c991d8..2d41e11 100644 --- a/gui/slint/src/main.rs +++ b/gui/slint/src/main.rs @@ -1,4 +1,4 @@ -use devmode_shared::{action::Action, clone::CloneAction}; +use devmode::{action::Action, clone::CloneAction}; slint::include_modules!(); diff --git a/shared/.gitignore b/shared/.gitignore deleted file mode 100644 index 6ff3b4c..0000000 --- a/shared/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ - -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html - -# These are backup files generated by rustfmt -**/*.rs.bk -*/target -Cargo.lock -*.out -/.out/ -/.idea -*.DS_Store -.vscode -.tasks -.vimspector.json \ No newline at end of file diff --git a/shared/Cargo.toml b/shared/Cargo.toml deleted file mode 100644 index 2aa7057..0000000 --- a/shared/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "devmode-shared" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -libset = "0.1.2" -clap = { version = "3.2.14", features = ["derive"] } -anyhow = "1.0.44" -requestty = "0.4.1" -colored = "2.0.0" -regex = "1.5.4" -git2 = "0.14.4" -git2_credentials = "0.8.0" -cmd_lib = "1.1.0" -walkdir = "2.3.2" -serde = { version = "1.0.126", features = ["derive"] } -fs_extra = "1.2.0" -derive_setters = "0.1.6" -git-url-parse = "0.4.4" diff --git a/shared/src/action.rs b/src/action.rs similarity index 100% rename from shared/src/action.rs rename to src/action.rs diff --git a/shared/src/application.rs b/src/application.rs similarity index 100% rename from shared/src/application.rs rename to src/application.rs diff --git a/shared/src/clone.rs b/src/clone.rs similarity index 100% rename from shared/src/clone.rs rename to src/clone.rs diff --git a/shared/src/constants.rs b/src/constants.rs similarity index 100% rename from shared/src/constants.rs rename to src/constants.rs diff --git a/shared/src/editor.rs b/src/editor.rs similarity index 100% rename from shared/src/editor.rs rename to src/editor.rs diff --git a/shared/src/fork.rs b/src/fork.rs similarity index 100% rename from shared/src/fork.rs rename to src/fork.rs diff --git a/shared/src/git_pull.rs b/src/git_pull.rs similarity index 100% rename from shared/src/git_pull.rs rename to src/git_pull.rs diff --git a/shared/src/host.rs b/src/host.rs similarity index 100% rename from shared/src/host.rs rename to src/host.rs diff --git a/shared/src/lib.rs b/src/lib.rs similarity index 100% rename from shared/src/lib.rs rename to src/lib.rs diff --git a/shared/src/project.rs b/src/project.rs similarity index 100% rename from shared/src/project.rs rename to src/project.rs diff --git a/shared/src/settings.rs b/src/settings.rs similarity index 100% rename from shared/src/settings.rs rename to src/settings.rs