Skip to content

Commit 7b9fa66

Browse files
authored
chore(template): Replace {{name}} with PLUGIN_NAME (#1088)
fixes #1052
1 parent cb96aa0 commit 7b9fa66

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

shared/template/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
2-
name = "tauri-plugin-{{name}}"
2+
name = "tauri-plugin-PLUGIN_NAME"
33
version = "1.0.0"
44
edition = { workspace = true }
55
authors = { workspace = true }
66
license = { workspace = true }
7-
links = "tauri-plugin-{{name}}"
7+
links = "tauri-plugin-PLUGIN_NAME"
88

99
[package.metadata.docs.rs]
1010
rustc-args = [ "--cfg", "docsrs" ]

shared/template/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![{{plugin-name}}](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/{{plugin-name}}/banner.png)
1+
![PLUGIN_NAME](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/PLUGIN_NAME/banner.png)
22

33
<!-- description -->
44

@@ -18,9 +18,9 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
1818

1919
```toml
2020
[dependencies]
21-
tauri-plugin-{{plugin-name}} = "2.0.0-beta"
21+
tauri-plugin-PLUGIN_NAME = "2.0.0-beta"
2222
# alternatively with Git:
23-
tauri-plugin-{{plugin-name}} = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
23+
tauri-plugin-PLUGIN_NAME = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
2424
```
2525

2626
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
@@ -30,18 +30,18 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
3030
<!-- Add the branch for installations using git! -->
3131

3232
```sh
33-
pnpm add @tauri-apps/plugin-{{plugin-name}}
33+
pnpm add @tauri-apps/plugin-PLUGIN_NAME
3434
# or
35-
npm add @tauri-apps/plugin-{{plugin-name}}
35+
npm add @tauri-apps/plugin-PLUGIN_NAME
3636
# or
37-
yarn add @tauri-apps/plugin-{{plugin-name}}
37+
yarn add @tauri-apps/plugin-PLUGIN_NAME
3838

3939
# alternatively with Git:
40-
pnpm add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2
40+
pnpm add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2
4141
# or
42-
npm add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2
42+
npm add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2
4343
# or
44-
yarn add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2
44+
yarn add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2
4545
```
4646

4747
## Usage
@@ -53,7 +53,7 @@ First you need to register the core plugin with Tauri:
5353
```rust
5454
fn main() {
5555
tauri::Builder::default()
56-
.plugin(tauri_plugin_{{plugin-name}}::init())
56+
.plugin(tauri_plugin_PLUGIN_NAME::init())
5757
.run(tauri::generate_context!())
5858
.expect("error while running tauri application");
5959
}

shared/template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@tauri-apps/plugin-{{name}}",
2+
"name": "@tauri-apps/plugin-PLUGIN_NAME",
33
"version": "1.0.0",
44
"license": "MIT or APACHE-2.0",
55
"authors": [

0 commit comments

Comments
 (0)