|
@@ -4,7 +4,7 @@ pub const ANCHOR_VERSION: &str = anchor_cli::VERSION;
|
|
|
|
|
|
pub fn workspace_manifest() -> String {
|
|
|
format!(
|
|
|
- include_str!("workspace.toml"),
|
|
|
+ include_str!("workspace.toml.template"),
|
|
|
VERSION = VERSION,
|
|
|
ANCHOR_VERSION = ANCHOR_VERSION
|
|
|
)
|
|
@@ -12,36 +12,36 @@ pub fn workspace_manifest() -> String {
|
|
|
|
|
|
pub fn package_json(jest: bool) -> String {
|
|
|
if jest {
|
|
|
- include_str!("jest.package.json").to_string()
|
|
|
+ include_str!("jest.package.json.template").to_string()
|
|
|
} else {
|
|
|
- include_str!("package.json").to_string()
|
|
|
+ include_str!("package.json.template").to_string()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
pub fn ts_package_json(jest: bool) -> String {
|
|
|
if jest {
|
|
|
- include_str!("jest.ts.package.json").to_string()
|
|
|
+ include_str!("jest.ts.package.json.template").to_string()
|
|
|
} else {
|
|
|
- include_str!("ts.package.json").to_string()
|
|
|
+ include_str!("ts.package.json.template").to_string()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
pub fn mocha(name: &str) -> String {
|
|
|
- format!(include_str!("mocha.js"), name)
|
|
|
+ format!(include_str!("mocha.js.template"), name)
|
|
|
}
|
|
|
|
|
|
pub fn jest(name: &str) -> String {
|
|
|
- format!(include_str!("jest.js"), name)
|
|
|
+ format!(include_str!("jest.js.template"), name)
|
|
|
}
|
|
|
|
|
|
pub fn ts_mocha(name: &str) -> String {
|
|
|
- format!(include_str!("mocha.ts"), name)
|
|
|
+ format!(include_str!("mocha.ts.template"), name)
|
|
|
}
|
|
|
|
|
|
pub fn cargo_toml(name: &str) -> String {
|
|
|
let snake_case_name = name.to_snake_case();
|
|
|
format!(
|
|
|
- include_str!("Cargo.toml"),
|
|
|
+ include_str!("Cargo.toml.template"),
|
|
|
name = name,
|
|
|
snake_case_name = snake_case_name,
|
|
|
VERSION = VERSION
|
|
@@ -52,7 +52,7 @@ pub fn cargo_toml(name: &str) -> String {
|
|
|
pub fn cargo_toml_with_serde(name: &str) -> String {
|
|
|
let snake_case_name = name.to_snake_case();
|
|
|
format!(
|
|
|
- include_str!("Cargo.serde.toml"),
|
|
|
+ include_str!("Cargo.serde.toml.template"),
|
|
|
name = name,
|
|
|
snake_case_name = snake_case_name,
|
|
|
VERSION = VERSION
|
|
@@ -60,21 +60,21 @@ pub fn cargo_toml_with_serde(name: &str) -> String {
|
|
|
}
|
|
|
|
|
|
pub fn xargo_toml() -> &'static str {
|
|
|
- include_str!("Xargo.toml")
|
|
|
+ include_str!("Xargo.toml.template")
|
|
|
}
|
|
|
pub fn git_ignore() -> &'static str {
|
|
|
- include_str!("gitignore")
|
|
|
+ include_str!(".gitignore.template")
|
|
|
}
|
|
|
|
|
|
pub fn prettier_ignore() -> &'static str {
|
|
|
- include_str!("prettierignore")
|
|
|
+ include_str!(".prettierignore.template")
|
|
|
}
|
|
|
|
|
|
pub(crate) fn types_cargo_toml() -> String {
|
|
|
let name = "bolt-types";
|
|
|
let snake_case_name = name.to_snake_case();
|
|
|
format!(
|
|
|
- include_str!("types.Cargo.toml"),
|
|
|
+ include_str!("types.Cargo.toml.template"),
|
|
|
name = name,
|
|
|
snake_case_name = snake_case_name,
|
|
|
VERSION = VERSION
|