Skip to content

Commit 6985639

Browse files
committed
fix: issue with bootstrap script
It was happening due to some incompatibilities between inquirer and prompts. Fixes #1220
1 parent 6974266 commit 6985639

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

examples/tryouts/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@
1717
"license": "ISC",
1818
"dependencies": {
1919
"@wordpress/i18n": "^3.19.2",
20-
"@wpackio/entrypoint": "^5.0.0",
20+
"@wpackio/entrypoint": "^6.0.1",
2121
"jQuery": "^1.7.4",
2222
"lodash": "^4.17.21",
2323
"react": "^17.0.2",
2424
"react-dom": "^17.0.2"
2525
},
2626
"devDependencies": {
2727
"@wpackio/scripts": "^5.0.0",
28+
"fork-ts-checker-webpack-plugin": "^6.2.5",
2829
"less": "^4.1.1",
29-
"postcss": "^8.2.12",
30-
"serve": "^11.3.2"
30+
"postcss": "^8.2.13",
31+
"serve": "^11.3.2",
32+
"typescript": "^4.2.4"
3133
}
3234
}

packages/scripts/src/scripts/Bootstrap.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,16 @@ export class Bootstrap {
170170
value: 'theme',
171171
},
172172
],
173-
initial: isTheme ? 'theme' : 'plugin',
173+
initial: isTheme ? 1 : 0,
174174
hint: isTheme
175175
? 'We think yours is a THEME'
176176
: 'We think yours is a PLUGIN',
177177
},
178178
// Ask appName (auto-generate from package.json)
179179
{
180-
message: answers => `Name of WordPress ${answers.type} (camelCase)`,
180+
message: prev => {
181+
return `Name of WordPress ${prev} (camelCase)`;
182+
},
181183
name: 'appName',
182184
type: 'text',
183185
initial: camelCase(this.pkg.name) || '',

0 commit comments

Comments
 (0)