Skip to content

Commit

Permalink
fs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
carloskiki committed Apr 13, 2023
1 parent d47a6df commit 9b2eaa0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
4 changes: 4 additions & 0 deletions build/src/fs.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mod readme_md;
mod cargo_toml;
mod lib_rs;
mod src_dir;
File renamed without changes.
2 changes: 1 addition & 1 deletion build/src/lib_rs.rs → build/src/fs/lib_rs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{io, path::PathBuf};

use anyhow::Result;
use heck::{ToSnakeCase, ToUpperCamelCase, ToShoutySnakeCase};
use heck::{ToUpperCamelCase, ToShoutySnakeCase};
use proc_macro2::{Ident, Span, TokenStream};
use quote::{format_ident, quote};
use snafu::{prelude::*, Backtrace};
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions build/src/icon_library/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mod icons_md;
#[derive(Debug)]
pub(crate) struct IconLibrary {
pub package: Package<Downloaded>,
pub name: String,
pub path: PathBuf,
pub cargo_toml: CargoToml<IconLibrary>,
pub readme_md: Readme<IconLibrary>,
Expand All @@ -27,10 +26,9 @@ pub(crate) struct IconLibrary {
}

impl IconLibrary {
pub fn new(package: Package<Downloaded>, name: String, root: PathBuf) -> Self {
pub fn new(package: Package<Downloaded>, root: PathBuf) -> Self {
Self {
package,
name,
path: root.clone(),
cargo_toml: CargoToml {
path: root.join("Cargo.toml"),
Expand Down
10 changes: 3 additions & 7 deletions build/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ mod main_library;
mod package;
mod path;
mod sem_ver;
mod readme_md;
mod cargo_toml;
mod lib_rs;
mod src_dir;
mod fs;

#[derive(Debug, Parser)]
#[command(author, version, about, long_about = None)]
Expand Down Expand Up @@ -63,9 +60,8 @@ async fn main() -> Result<()> {
})?;

// Generate the library for that package.
let lib_name = format!("leptos-icons-{}", package.meta.short_name);
let lib_path = path::library_crate(&lib_name, "");
let mut lib = IconLibrary::new(package, lib_name, lib_path);
let lib_path = path::library_crate(format!("leptos-icons-{}", package.meta.short_name), "");
let mut lib = IconLibrary::new(package, lib_path);

lib.generate().await?;

Expand Down
File renamed without changes.

0 comments on commit 9b2eaa0

Please sign in to comment.