Skip to content

Commit

Permalink
Add freya
Browse files Browse the repository at this point in the history
  • Loading branch information
edfloreshz committed Feb 4, 2024
1 parent 083c6df commit c99efa3
Show file tree
Hide file tree
Showing 25 changed files with 141 additions and 80 deletions.
42 changes: 41 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <edfloreshz@proton.me>"]
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"]
20 changes: 10 additions & 10 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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")]
Expand Down
12 changes: 6 additions & 6 deletions cli/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
14 changes: 10 additions & 4 deletions gui/egui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 = "../../" }
2 changes: 1 addition & 1 deletion gui/egui/src/panels/preferences.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
18 changes: 18 additions & 0 deletions gui/freya/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "devmode-freya"
version = "0.1.0"
authors = ["Eduardo Flores <edfloreshz@proton.me>"]
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 }
26 changes: 26 additions & 0 deletions gui/freya/src/main.rs
Original file line number Diff line number Diff line change
@@ -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}" }
}
)
}
14 changes: 10 additions & 4 deletions gui/iced/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 = "../../" }
2 changes: 1 addition & 1 deletion gui/iced/src/pages/preferences.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
15 changes: 10 additions & 5 deletions gui/slint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
[package]
name = "devmode-gui"
version = "0.1.0"
authors = ["Eduardo Flores <edfloreshz@gmail.com>"]
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"

Expand Down
2 changes: 1 addition & 1 deletion gui/slint/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use devmode_shared::{action::Action, clone::CloneAction};
use devmode::{action::Action, clone::CloneAction};

slint::include_modules!();

Expand Down
18 changes: 0 additions & 18 deletions shared/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions shared/Cargo.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c99efa3

Please sign in to comment.