refactor: remove a lot of implicit anys (#7468)

This commit is contained in:
Joshua Chen 2022-05-23 15:40:53 +08:00 committed by GitHub
parent 0c8e57de67
commit 3666a2ede5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 148 additions and 163 deletions

View file

@ -45,24 +45,12 @@ program
\`custom\`: enter your custom git clone command. We will prompt you for it.`,
)
.description('Initialize website.')
.action(
(
siteName,
template,
rootDir = '.',
{packageManager, skipInstall, typescript, gitStrategy} = {},
) => {
// See https://github.com/facebook/docusaurus/pull/6860
import('../lib/index.js').then(({default: init}) => {
init(path.resolve(rootDir), siteName, template, {
packageManager,
skipInstall,
typescript,
gitStrategy,
});
});
},
);
.action((siteName, template, rootDir, options) => {
// See https://github.com/facebook/docusaurus/pull/6860
import('../lib/index.js').then(({default: init}) => {
init(path.resolve(rootDir ?? '.'), siteName, template, options);
});
});
program.parse(process.argv);