Move svg-units and dyesub into separate crates

main
Elnu 1 year ago
parent 18c1e84b79
commit fb10870a3b

@ -1,5 +1,7 @@
{
"rust-analyzer.linkedProjects": [
"./dyesub-tool/Cargo.toml",
"./dyesub/Cargo.toml",
"./svg-units/Cargo.toml",
]
}

26
Cargo.lock generated

@ -400,19 +400,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408"
[[package]]
name = "dyesub-tool"
name = "dyesub"
version = "0.1.0"
dependencies = [
"askama",
"derive_more",
"kle-serial",
"lazy_static",
"serde_json",
"svg-units",
]
[[package]]
name = "dyesub-tool"
version = "0.1.0"
dependencies = [
"class_list",
"derive_more",
"kle-serial",
"lazy_static",
"leptos",
"regex",
"serde_json",
"strum",
"strum_macros",
"svg-units",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
@ -1776,6 +1787,17 @@ dependencies = [
"syn 2.0.28",
]
[[package]]
name = "svg-units"
version = "0.1.0"
dependencies = [
"derive_more",
"lazy_static",
"regex",
"strum",
"strum_macros",
]
[[package]]
name = "syn"
version = "1.0.109"

@ -1,3 +1,3 @@
[workspace]
members = ["dyesub-tool"]
members = ["dyesub-tool", "dyesub", "svg-units"]
resolver = "2"

@ -4,13 +4,12 @@ version = "0.1.0"
edition = "2021"
[dependencies]
askama = "0.12.0"
svg-units = { path = "../svg-units" }
class_list = "0.1.1"
derive_more = "0.99.17"
kle-serial = "0.2.2"
lazy_static = "1.4.0"
leptos = { version = "0.4.8", features = ["csr", "nightly"] }
regex = "1.9.3"
serde_json = "1.0.105"
strum = "0.25.0"
strum_macros = "0.25.2"

@ -3,10 +3,6 @@
mod components;
mod error;
mod models;
#[allow(dead_code)]
mod render;
#[allow(dead_code)]
pub mod svg;
mod utils;
use leptos::*;

@ -0,0 +1,14 @@
[package]
name = "dyesub"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
svg-units = { path = "../svg-units" }
askama = "0.12.0"
derive_more = "0.99.17"
kle-serial = "0.2.2"
lazy_static = "1.4.0"
serde_json = "1.0.105"

@ -4,7 +4,7 @@ use askama::Template;
use derive_more::From;
use lazy_static::lazy_static;
use crate::svg::{SVGMeasure, SVGUnit};
use svg_units::{SVGMeasure, SVGUnit};
#[derive(Template)]
#[template(path = "document.xml")]
@ -28,7 +28,7 @@ lazy_static! {
}
mod filters {
use crate::svg::{SVGMeasure, SVGUnit};
use svg_units::{SVGMeasure, SVGUnit};
pub fn kle_font_units(kle_font_units: &usize) -> askama::Result<SVGMeasure> {
Ok(SVGMeasure::new(

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

@ -55,7 +55,7 @@ Updating `cargoHash`:
version = "0.1.0";
buildAndTestSubdir = "dyesub-tool";
buildInputs = with pkgs; [ trunk ];
cargoHash = "sha256-aaEDYeGIiAH1RsO7zTJKefnT8aKCbIT3ssukW25GLDY=";
cargoHash = "sha256-52zTjWRXq058BhuRj2A7mvWzC88UCEolodnBcfa3Ol8=";
meta = meta // {
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps.";
};

@ -0,0 +1,13 @@
[package]
name = "svg-units"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
derive_more = "0.99.17"
lazy_static = "1.4.0"
regex = "1.9.3"
strum = "0.25.0"
strum_macros = "0.25.2"

@ -1,6 +1,6 @@
use std::str::FromStr;
use crate::svg::{SVGMeasure, SVGUnit};
use crate::{SVGMeasure, SVGUnit};
#[test]
fn add() {
Loading…
Cancel
Save