fix: recommended run dev command in create-tauri-app (#2555)

`--dev` is not a valid option for `tauri` cli; instead, we should use
`-- dev` or just `dev`. Also, we can just use `tauri dev` for all
package managers so we don't need to do the npm checking.
This commit is contained in:
cybai 2021-08-31 00:31:38 +09:00 committed by GitHub
parent 2ec998b982
commit f2865fad13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 18 deletions

View File

@ -50,9 +50,7 @@ export const dominator: Recipe = {
$ cd ${cfg.appName}
$ ${packageManager} install
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri ${
packageManager === 'npm' ? '--' : ''
}dev
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri dev
`)
return await Promise.resolve()
}

View File

@ -100,9 +100,7 @@ const ngcli: Recipe = {
Your installation completed.
$ cd ${cfg.appName}
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri ${
packageManager === 'npm' ? '--' : ''
}dev
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri dev
`)
return await Promise.resolve()

View File

@ -120,9 +120,7 @@ export const cra: Recipe = {
Your installation completed.
$ cd ${cfg.appName}
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri ${
packageManager === 'npm' ? '--' : ''
}dev
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri dev
`)
return await Promise.resolve()
}

View File

@ -60,9 +60,7 @@ const svelte: Recipe = {
$ cd ${cfg.appName}
$ ${packageManager} install
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri ${
packageManager === 'npm' ? '--' : ''
}dev
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri dev
`)
return await Promise.resolve()

View File

@ -45,9 +45,7 @@ export const vanillajs: Recipe = {
$ cd ${cfg.appName}
$ ${packageManager} install
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri ${
packageManager === 'npm' ? '--' : ''
}dev
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri dev
`)
return await Promise.resolve()
}

View File

@ -91,9 +91,7 @@ const vite: Recipe = {
Your installation completed.
$ cd ${cfg.appName}
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri ${
packageManager === 'npm' ? '--' : ''
}dev
$ ${packageManager === 'npm' ? 'npm run' : packageManager} tauri dev
`)
return await Promise.resolve()
}