Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Commit ec37b37

Browse files
committed
feat(generator): ask for window title
1 parent 7859d43 commit ec37b37

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

generator/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { error } = require('@vue/cli-shared-utils')
33
const fs = require('fs-extra')
44
const init = require('tauri/dist/api/init')
55

6-
module.exports = async api => {
6+
module.exports = async (api, options) => {
77
await execa('cargo', ['tauri-cli', '--version']).catch(() => {
88
// TODO: provide better error
99
error('Tauri CLI crate not installed')
@@ -13,7 +13,12 @@ module.exports = async api => {
1313
init({
1414
directory: api.resolve('.'),
1515
customConfig: {
16-
build: null
16+
build: null,
17+
tauri: {
18+
window: {
19+
title: options.windowTitle
20+
}
21+
}
1722
}
1823
})
1924

prompts.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = pkg => [
2+
{
3+
type: 'input',
4+
name: 'windowTitle',
5+
message: 'What should the window title be?',
6+
validate: input => !!input,
7+
default: pkg.name
8+
}
9+
]

0 commit comments

Comments
 (0)