Skip to content

Commit e950d08

Browse files
authored
feat: allow passing args to powershell scripts (#345)
1 parent 92f3985 commit e950d08

3 files changed

Lines changed: 21 additions & 9 deletions

File tree

.changes/powerhsell-args.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"create-tauri-app": "patch"
3+
"create-tauri-app-js": "patch"
4+
---
5+
6+
Allow passing arguments though `CTA_ARGS` for powershell script `$env:CTA_ARGS="--template svelte --manager pnpm";iwr -useb https://create.tauri.app/ps | iex`

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,48 @@
88
[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
99
[![support](https://img.shields.io/badge/sponsor-Open%20Collective-blue.svg)](https://opencollective.com/tauri)
1010

11-
1211
# Usage
1312

1413
## Bash:
1514

16-
```
15+
```
1716
sh <(curl https://create.tauri.app/sh)
1817
```
19-
or
18+
19+
or
20+
2021
```
2122
sh <(wget https://create.tauri.app/sh)
2223
```
2324

2425
## Powershell:
2526

26-
``` powershell
27+
```powershell
2728
iwr -useb https://create.tauri.app/ps | iex
2829
```
2930

3031
## Cargo:
3132

32-
``` bash
33+
```bash
3334
cargo install create-tauri-app
3435
cargo create-tauri-app
3536
```
3637

3738
## NPM:
3839

39-
``` bash
40+
```bash
4041
npm create tauri-app@latest
4142
```
4243

4344
## Yarn:
4445

45-
``` bash
46+
```bash
4647
yarn create tauri-app
4748
```
4849

4950
## PNPM:
5051

51-
``` bash
52+
```bash
5253
pnpm create tauri-app
5354
```
5455

@@ -61,6 +62,8 @@ You can also directly specify the project name, package manager and the template
6162
sh <(curl https://create.tauri.app/sh) my-tauri-app --template svelte --manager pnpm
6263
# wget
6364
sh <(wget https://create.tauri.app/sh) my-tauri-app --template svelte --manager pnpm
65+
# powershell
66+
$env:CTA_ARGS="--template svelte --manager pnpm";iwr -useb https://create.tauri.app/ps | iex
6467
# cargo
6568
cargo create-tauri-app my-tauri-app --template svelte --manager pnpm
6669
# npm 6.x
@@ -98,12 +101,15 @@ Currently supported template presets include:
98101
You can use `.` for the project name to scaffold in the current directory.
99102

100103
## Semver
104+
101105
**create-tauri-app** is following [Semantic Versioning 2.0](https://semver.org/).
102106

103107
## Licenses
108+
104109
Code: (c) 2022 - The Tauri Programme within The Commons Conservancy.
105110

106111
MIT or MIT/Apache 2.0 where applicable.
107112

108113
Logo: CC-BY-NC-ND
114+
109115
- Original Tauri Logo Designs by [Daniel Thompson-Yvetot](https://github.com/nothingismagick) and [Guillaume Chau](https://github.com/akryum)

create-tauri-app.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ $ProgressPreference = 'SilentlyContinue'
1515
Invoke-WebRequest -Uri $url -OutFile $outFile
1616
$ProgressPreference = $oldProgressPreference
1717

18-
Start-Process -FilePath $outFile -Wait -NoNewWindow
18+
Start-Process -FilePath $outFile -Wait -NoNewWindow -ArgumentList "$Env:CTA_ARGS"

0 commit comments

Comments
 (0)