Skip to content

Commit

Permalink
Rename diffedit3-web package to diffedit3
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyagr committed Feb 21, 2024
1 parent 4a21fe4 commit 025f01a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
toolchain: stable
target: ${{ matrix.target }}
- name: Build release binary
run: cargo build --target ${{ matrix.target }} --verbose --release -p diffedit3-web
run: cargo build --target ${{ matrix.target }} --verbose --release -p diffedit3
- name: Build archive
shell: bash
run: |
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend-local-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "diffedit3-web"
name = "diffedit3"
version = { workspace = true }
edition = { workspace = true }

Expand Down
6 changes: 3 additions & 3 deletions backend-local-server/src/bin/diffedit3-web.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use clap::Parser;
use diffedit3_web::local_server::{run_server, MergeToolError};
use diffedit3::local_server::{run_server, MergeToolError};

/// Compare three directories in a browser and allow editing one of them
#[derive(Parser)]
#[command(version, about)]
pub struct LocalServerCli {
#[command(flatten)]
lib_cli: diffedit3_web::fs::Cli,
lib_cli: diffedit3::fs::Cli,
/// Port to use for `http://127.0.0.1`
#[arg(long, short, default_value = "8080")]
port: usize,
Expand Down Expand Up @@ -37,7 +37,7 @@ fn exit_with_cli_error(s: String) -> ! {
#[tokio::main]
async fn main() -> Result<(), MergeToolError> {
let cli = LocalServerCli::parse();
let input: diffedit3_web::fs::ThreeDirInput = match cli.lib_cli.try_into() {
let input: diffedit3::fs::ThreeDirInput = match cli.lib_cli.try_into() {
Ok(i) => i,
Err(err) => {
exit_with_cli_error(err.to_string());
Expand Down
2 changes: 1 addition & 1 deletion backend-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
indexmap = { version = "2.2.3", features = ["serde"] }
clap = { version = "4.5.0", features = ["derive"] }
diffedit3-web = { path = "../backend-local-server" }
diffedit3 = { path = "../backend-local-server" }

[features]
# this feature is used for production builds or when `devPath` points to the filesystem
Expand Down
14 changes: 7 additions & 7 deletions backend-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use clap::Parser;
use diffedit3_web::DataInterface;
use diffedit3::DataInterface;
use indexmap::IndexMap;
use tauri::{CustomMenuItem, Menu, Submenu};

Expand All @@ -25,15 +25,15 @@ fn logoutput(result: IndexMap<String, String>) {
#[tauri::command]
fn save(
result: IndexMap<String, String>,
state: tauri::State<diffedit3_web::fs::ThreeDirInput>,
) -> Result<(), diffedit3_web::DataSaveError> {
state: tauri::State<diffedit3::fs::ThreeDirInput>,
) -> Result<(), diffedit3::DataSaveError> {
state.save(result)
}

#[tauri::command]
fn get_merge_data(
state: tauri::State<diffedit3_web::fs::ThreeDirInput>,
) -> Result<diffedit3_web::EntriesToCompare, diffedit3_web::DataReadError> {
state: tauri::State<diffedit3::fs::ThreeDirInput>,
) -> Result<diffedit3::EntriesToCompare, diffedit3::DataReadError> {
state.scan()
}

Expand All @@ -44,8 +44,8 @@ fn get_merge_data(
// So far, the most promising approach is to change the `font-size` root
// CSS property
fn main() {
let cli = diffedit3_web::Cli::parse();
let input: diffedit3_web::ThreeDirInput = cli.try_into().unwrap_or_else(|err| {
let cli = diffedit3::Cli::parse();
let input: diffedit3::ThreeDirInput = cli.try_into().unwrap_or_else(|err| {
eprintln!("Error: {err}");
std::process::exit(2)
});
Expand Down

0 comments on commit 025f01a

Please sign in to comment.