Skip to content

Commit

Permalink
➖ Remove library
Browse files Browse the repository at this point in the history
It's an executable only now
  • Loading branch information
phoenixr-codes committed Mar 30, 2024
1 parent 11f5a1c commit daccd5e
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ share = ["tokio", "warp", "qrcode", "local-ip-address"]
watch = ["notify", "notify-debouncer-mini"]


[lib]
name = "allay"
# [lib]
# name = "allay"

[[bin]]
doc = false
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs → src/_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#![doc(html_logo_url = "https://raw.githubusercontent.com/allay-mc/assets/main/logo-1080x.png")]
#![doc = include_str!("../README.md")]

// TODO: only use Deserialize/Serialize where needed
// TODO: change visibility of items, maybe just make it executable only

pub mod config;
pub mod diagnostic;
pub mod error;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::prelude::*;
use allay::project::Project;
use crate::project::Project;
use clap::{ArgMatches, Command};
use std::process::ExitCode;
use std::time::Instant;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/explain.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use allay::diagnostic::{self, Diagnostic};
use crate::diagnostic::{self, Diagnostic};
use clap::{Arg, ArgMatches, Command};
use std::process::ExitCode;

Expand Down
2 changes: 1 addition & 1 deletion src/cli/export.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::build;
use super::prelude::*;
use allay::paths;
use crate::paths;
use clap::{ArgMatches, Command};
use std::process::ExitCode;

Expand Down
2 changes: 1 addition & 1 deletion src/cli/health.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use allay::{paths, Health};
use crate::{paths, Health};
use clap::{Arg, ArgAction, ArgMatches, Command};
use std::process::ExitCode;

Expand Down
10 changes: 3 additions & 7 deletions src/cli/init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use allay::Project;
use crate::project::{Project, ProjectInitConfig};
use clap::{Arg, ArgAction, ArgMatches, Command};
use std::path::PathBuf;
use std::process::ExitCode;
Expand Down Expand Up @@ -32,12 +32,8 @@ pub fn run(matches: &ArgMatches) -> ExitCode {
let force: bool = matches.get_flag("force");
let with_gitignore: bool = matches.get_flag("gitignore");

Project::new(
path,
force,
allay::project::ProjectInitConfig { with_gitignore },
)
.expect("Failed do initialize project");
Project::new(path, force, ProjectInitConfig { with_gitignore })
.expect("Failed do initialize project");

ExitCode::SUCCESS
}
2 changes: 1 addition & 1 deletion src/cli/logs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use allay::paths;
use crate::paths;
use clap::{Arg, ArgAction, ArgMatches, Command};
use std::{fs, process::ExitCode};

Expand Down
2 changes: 1 addition & 1 deletion src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod uuid;
#[cfg(feature = "watch")]
mod watch;

use allay::paths;
use crate::paths;
use clap::{Arg, ArgAction, ArgMatches, Command};
use log::{Level, LevelFilter};
use simplelog::{
Expand Down
2 changes: 1 addition & 1 deletion src/cli/schema.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use allay::Config;
use crate::Config;
use clap::{Arg, ArgMatches, Command};
use std::process::ExitCode;

Expand Down
2 changes: 1 addition & 1 deletion src/cli/share.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use super::build;
use super::prelude::*;
use allay::paths;
use crate::paths;
use clap::{Arg, ArgMatches, Command};
use local_ip_address::local_ip;
use qrcode::QrCode;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/uuid/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use allay::Project;
use crate::Project;
use clap::{ArgMatches, Command};
use prettytable::format::consts::*;
use std::process::ExitCode;
Expand Down
6 changes: 3 additions & 3 deletions src/cli/uuid/refresh.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::fs;

use allay::paths;
use allay::uuid::Uuids;
use allay::Pack;
use crate::paths;
use crate::uuid::Uuids;
use crate::Pack;
use clap::{Arg, ArgMatches, Command};

pub fn cmd() -> Command {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/watch.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::prelude::*;
use allay::{paths, Project};
use crate::{paths, Project};
use clap::{ArgMatches, Command};
use std::path::{Path, PathBuf};
use std::process::ExitCode;
Expand Down
2 changes: 1 addition & 1 deletion src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! This is an important step when Allay is used the first time as it creates directories used for saving
//! log files for example. This should also be run when such directories are deleted by the user.
use allay::paths;
use crate::paths;
use std::fs;
use std::io::ErrorKind;

Expand Down
19 changes: 19 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,28 @@
// *****

mod cli;
mod config;
mod diagnostic;
mod error;
mod filter;
mod health;
mod init;
mod localization;
mod manifest;
mod pack;
mod paths;
mod plugin;
mod project;
mod scaffolding;
mod uuid;

use crate::init::init;
use config::Config;
use error::Error;
use health::Health;
use manifest::Manifest;
use pack::Pack;
use project::Project;
use std::process::ExitCode;

fn main() -> ExitCode {
Expand Down

0 comments on commit daccd5e

Please sign in to comment.