Skip to content

Commit

Permalink
fix: issue with bootstrap script
Browse files Browse the repository at this point in the history
It was happening due to some incompatibilities between inquirer
and prompts.

Fixes #1220
  • Loading branch information
swashata committed May 2, 2021
1 parent 6974266 commit 6985639
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions examples/tryouts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@
"license": "ISC",
"dependencies": {
"@wordpress/i18n": "^3.19.2",
"@wpackio/entrypoint": "^5.0.0",
"@wpackio/entrypoint": "^6.0.1",
"jQuery": "^1.7.4",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@wpackio/scripts": "^5.0.0",
"fork-ts-checker-webpack-plugin": "^6.2.5",
"less": "^4.1.1",
"postcss": "^8.2.12",
"serve": "^11.3.2"
"postcss": "^8.2.13",
"serve": "^11.3.2",
"typescript": "^4.2.4"
}
}
6 changes: 4 additions & 2 deletions packages/scripts/src/scripts/Bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,16 @@ export class Bootstrap {
value: 'theme',
},
],
initial: isTheme ? 'theme' : 'plugin',
initial: isTheme ? 1 : 0,
hint: isTheme
? 'We think yours is a THEME'
: 'We think yours is a PLUGIN',
},
// Ask appName (auto-generate from package.json)
{
message: answers => `Name of WordPress ${answers.type} (camelCase)`,
message: prev => {
return `Name of WordPress ${prev} (camelCase)`;
},
name: 'appName',
type: 'text',
initial: camelCase(this.pkg.name) || '',
Expand Down

0 comments on commit 6985639

Please sign in to comment.