-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: renaming, removing unused features and styling (#33)
* docs: remove todo comments * style: add rustfmt.toml file * remove ept parachain * refactor: rename vanilla per base parachain * refactor: replace println per log * style: cargo fmt
- Loading branch information
Showing
31 changed files
with
1,213 additions
and
1,330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
[submodule "templates/ept"] | ||
path = templates/ept | ||
url = git@github.com:paritytech/extended-parachain-template.git | ||
|
||
[submodule "templates/vanilla-parachain"] | ||
path = templates/vanilla-parachain | ||
url = git@github.com:r0guelabs/vanilla-parachain.git | ||
[submodule "templates/base-parachain"] | ||
path = templates/base-parachain | ||
url = git@github.com:r0gue-io/base-parachain.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Basic | ||
edition = "2021" | ||
hard_tabs = true | ||
max_width = 100 | ||
use_small_heuristics = "Max" | ||
# Imports | ||
imports_granularity = "Crate" | ||
reorder_imports = true | ||
# Consistency | ||
newline_style = "Unix" | ||
# Misc | ||
chain_width = 80 | ||
spaces_around_ranges = false | ||
binop_separator = "Back" | ||
reorder_impl_items = false | ||
match_arm_leading_pipes = "Preserve" | ||
match_arm_blocks = false | ||
match_block_trailing_comma = true | ||
trailing_comma = "Vertical" | ||
trailing_semicolon = false | ||
use_field_init_shorthand = true | ||
# Format comments | ||
comment_width = 100 | ||
wrap_comments = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
use crate::style::{style, Theme}; | ||
use clap::Args; | ||
use cliclack::{clear_screen, intro, outro, set_theme}; | ||
use std::path::PathBuf; | ||
use cliclack::{clear_screen,intro, set_theme, outro}; | ||
use crate::style::{style, Theme}; | ||
|
||
use crate::engines::parachain_engine::build_parachain; | ||
|
||
|
||
#[derive(Args)] | ||
pub struct BuildParachainCommand { | ||
#[arg(short = 'p', long = "path", help = "Directory path for your project, [default: current directory]")] | ||
pub(crate) path: Option<PathBuf>, | ||
#[arg( | ||
short = 'p', | ||
long = "path", | ||
help = "Directory path for your project, [default: current directory]" | ||
)] | ||
pub(crate) path: Option<PathBuf>, | ||
} | ||
|
||
impl BuildParachainCommand { | ||
pub(crate) fn execute(&self) -> anyhow::Result<()> { | ||
clear_screen()?; | ||
intro(format!( | ||
"{}: Building a parachain", | ||
style(" Pop CLI ").black().on_magenta() | ||
))?; | ||
set_theme(Theme); | ||
build_parachain(&self.path)?; | ||
pub(crate) fn execute(&self) -> anyhow::Result<()> { | ||
clear_screen()?; | ||
intro(format!("{}: Building a parachain", style(" Pop CLI ").black().on_magenta()))?; | ||
set_theme(Theme); | ||
build_parachain(&self.path)?; | ||
|
||
outro("Build Completed Successfully!")?; | ||
Ok(()) | ||
} | ||
} | ||
outro("Build Completed Successfully!")?; | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pub(crate) mod new; | ||
pub(crate) mod build; | ||
pub(crate) mod up; | ||
pub(crate) mod new; | ||
pub(crate) mod test; | ||
pub(crate) mod up; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
use crate::engines::pallet_engine::{create_pallet_template, TemplatePalletConfig}; | ||
use clap::Args; | ||
use crate::engines::pallet_engine::{TemplatePalletConfig, create_pallet_template}; | ||
|
||
#[derive(Args)] | ||
pub struct NewPalletCommand { | ||
#[arg(help = "Name of the pallet", default_value = "pallet-template")] | ||
pub(crate) name: String, | ||
#[arg(short, long, help = "Name of authors", default_value = "Anonymous")] | ||
pub(crate) authors: Option<String>, | ||
#[arg( | ||
short, | ||
long, | ||
help = "Pallet description", | ||
default_value = "Frame Pallet" | ||
)] | ||
pub(crate) description: Option<String>, | ||
#[arg(short = 'p', long, help = "Path to the pallet, [default: current directory]")] | ||
pub(crate) path: Option<String>, | ||
#[arg(help = "Name of the pallet", default_value = "pallet-template")] | ||
pub(crate) name: String, | ||
#[arg(short, long, help = "Name of authors", default_value = "Anonymous")] | ||
pub(crate) authors: Option<String>, | ||
#[arg(short, long, help = "Pallet description", default_value = "Frame Pallet")] | ||
pub(crate) description: Option<String>, | ||
#[arg(short = 'p', long, help = "Path to the pallet, [default: current directory]")] | ||
pub(crate) path: Option<String>, | ||
} | ||
|
||
impl NewPalletCommand { | ||
pub(crate) fn execute(&self) -> anyhow::Result<()> { | ||
create_pallet_template(self.path.clone(), TemplatePalletConfig { | ||
name: self.name.clone(), | ||
authors: self.authors.clone().expect("default values"), | ||
description: self.description.clone().expect("default values"), | ||
})?; | ||
Ok(()) | ||
} | ||
} | ||
pub(crate) fn execute(&self) -> anyhow::Result<()> { | ||
create_pallet_template( | ||
self.path.clone(), | ||
TemplatePalletConfig { | ||
name: self.name.clone(), | ||
authors: self.authors.clone().expect("default values"), | ||
description: self.description.clone().expect("default values"), | ||
}, | ||
)?; | ||
Ok(()) | ||
} | ||
} |
Oops, something went wrong.