create-bingstack-app 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +10 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -27,6 +27,13 @@ async function main() {
|
|
|
27
27
|
if (p.isCancel(projectName)) return cancel()
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
const appDisplayName = await p.text({
|
|
31
|
+
message: 'App display name (shown in the UI)',
|
|
32
|
+
placeholder: 'Acme.inc',
|
|
33
|
+
initialValue: 'Acme.inc',
|
|
34
|
+
})
|
|
35
|
+
if (p.isCancel(appDisplayName)) return cancel()
|
|
36
|
+
|
|
30
37
|
const protectedRoute = await p.text({
|
|
31
38
|
message: 'Main protected page name (shown after sign-in)',
|
|
32
39
|
placeholder: 'dashboard',
|
|
@@ -84,7 +91,7 @@ async function main() {
|
|
|
84
91
|
{
|
|
85
92
|
const s = p.spinner()
|
|
86
93
|
s.start('Configuring project...')
|
|
87
|
-
await applyReplacements(targetDir, projectName, protectedRoute)
|
|
94
|
+
await applyReplacements(targetDir, projectName, protectedRoute, appDisplayName)
|
|
88
95
|
s.stop('Project configured')
|
|
89
96
|
}
|
|
90
97
|
|
|
@@ -115,7 +122,7 @@ async function main() {
|
|
|
115
122
|
)
|
|
116
123
|
}
|
|
117
124
|
|
|
118
|
-
async function applyReplacements(dir, appName, protectedRoute) {
|
|
125
|
+
async function applyReplacements(dir, appName, protectedRoute, appDisplayName) {
|
|
119
126
|
const oldRoute = 'workspace'
|
|
120
127
|
|
|
121
128
|
if (protectedRoute !== oldRoute) {
|
|
@@ -141,6 +148,7 @@ async function applyReplacements(dir, appName, protectedRoute) {
|
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
content = content.replaceAll('TanStack Start Starter', toTitleCase(appName))
|
|
151
|
+
content = content.replaceAll('Acme.inc', appDisplayName)
|
|
144
152
|
|
|
145
153
|
if (protectedRoute !== oldRoute) {
|
|
146
154
|
content = content
|