Skip to content

Commit

Permalink
all crates under crates dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Nov 1, 2024
1 parent 7f7a129 commit ee4a0bb
Show file tree
Hide file tree
Showing 85 changed files with 42 additions and 31 deletions.
34 changes: 8 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
[dependencies]
anyhow = {version = "1.0.66", features = ["backtrace"]}
camino = "1.1.4"
chrono = {version = "0.4.19", features = ["serde"]}
clap = {version = "4.1.4", features = ["derive"]}
console-subscriber = {version = "0.1.8", optional = true}
futures = "0.3.28"
indexmap = "1.9.2"
once_cell = "1.16.0"
serde = {version = "1.0.138", features = ["derive"]}
serde_json = "1.0.82"
ssg-parent = {version = "0.0.0", path = "ssg-parent"}
thiserror = "1.0.40"
# TODO less features
tokio = {version = "1.21.0", features = ["full"]}
url = "2.3.1"

[features]
tokio_console = ["dep:console-subscriber"]

[package]
name = "cli"
version = "0.0.0"
edition = "2021"

[workspace]
members = ["builder"]
resolver = "2"
members = ["crates/*"]
default-members = ["crates/cli"]

[workspace.dependencies]
reactive.path = "crates/reactive"
ssg-child.path = "crates/ssg-child"
ssg-parent.path = "crates/ssg-parent"
2 changes: 1 addition & 1 deletion builder/Cargo.toml → crates/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ schema = "0.1.0"
serde = {version = "1.0.138", features = ["derive"]}
serde_json = "1.0.82"
serde_yaml = "0.9.11"
ssg-child = {version = "0.0.0", path = "../ssg-child"}
strum = {version = "0.24.1", features = ["derive"]}
syn = {version = "2.0.5", features = ["full"]}
thiserror = "1.0.40"
# TODO less features
tokio = {version = "1.21.0", features = ["full"]}
url = "2.3.1"
ssg-child.workspace = true

[features]
tokio_console = ["dep:console-subscriber"]
Expand Down
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub(crate) const DESCRIPTION: &str = "A mob programming community";
pub(crate) const MOBS_DIR: &str = "mobs";

pub(crate) static MOBS_PATH: Lazy<Utf8PathBuf> = Lazy::new(|| {
[env!("CARGO_MANIFEST_DIR"), "..", MOBS_DIR]
[env!("CARGO_MANIFEST_DIR"), "..", "..", MOBS_DIR]
.iter()
.collect()
});
Expand Down
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[dependencies]
anyhow = {version = "1.0.66", features = ["backtrace"]}
camino = "1.1.4"
chrono = {version = "0.4.19", features = ["serde"]}
clap = {version = "4.1.4", features = ["derive"]}
console-subscriber = {version = "0.1.8", optional = true}
futures = "0.3.28"
indexmap = "1.9.2"
once_cell = "1.16.0"
serde = {version = "1.0.138", features = ["derive"]}
serde_json = "1.0.82"
thiserror = "1.0.40"
# TODO less features
tokio = {version = "1.21.0", features = ["full"]}
url = "2.3.1"
ssg-parent.workspace = true

[features]
tokio_console = ["dep:console-subscriber"]

[package]
name = "cli"
version = "0.0.0"
edition = "2021"
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main.rs → crates/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use once_cell::sync::Lazy;
use ssg_parent::Parent;

pub static OUTPUT_DIR: Lazy<Utf8PathBuf> =
Lazy::new(|| Utf8PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(".vercel/output/static"));
Lazy::new(|| Utf8PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../.vercel/output/static"));

#[derive(Debug, Parser)]
struct Cli {
Expand Down
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ssg-parent/Cargo.toml → crates/ssg-parent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ live-server = "0.6.0"
once_cell = "1.17.1"
open = "4.1.0"
portpicker = "0.1.1"
reactive = {version = "0.1.0", path = "../reactive"}
reqwest = {version = "0.11.11", default-features = false, features = ["rustls-tls"]}
thiserror = "1.0.38"
# TODO less features
tokio = {version = "1.21.0", features = ["fs", "tokio-macros", "full"]}
url = "2.3.1"
reactive.workspace = true

[package]
name = "ssg-parent"
Expand Down
7 changes: 6 additions & 1 deletion ssg-parent/src/lib.rs → crates/ssg-parent/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![warn(clippy::all, clippy::pedantic)]

use camino::Utf8PathBuf;
use colored::Colorize;
use futures::{
channel::mpsc,
Expand Down Expand Up @@ -129,7 +130,11 @@ impl Parent {
reactive::driver::open_that::StaticOpenThatDriver::new(url.to_string());
let (eprintln_driver, ()) = reactive::driver::println::EprintlnDriver::new();
let (notify_driver, notify) =
match reactive::driver::notify::FsChangeDriver::new(BUILDER_CRATE_NAME) {
match reactive::driver::notify::FsChangeDriver::new(Utf8PathBuf::from_iter([
env!("CARGO_MANIFEST_DIR"),
"..",
BUILDER_CRATE_NAME,
])) {
Ok(val) => val,
Err(e) => return e.into(),
};
Expand Down

0 comments on commit ee4a0bb

Please sign in to comment.