mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
refactor: fix more type-aware linting errors (#7479)
This commit is contained in:
parent
bf1513a3e3
commit
624735bd92
51 changed files with 192 additions and 189 deletions
|
@ -44,9 +44,10 @@ async function generateTemplateExample(template) {
|
|||
`npm init docusaurus@latest examples/${template} ${command}`,
|
||||
);
|
||||
|
||||
const templatePackageJson = await fs.readJSON(
|
||||
`examples/${template}/package.json`,
|
||||
);
|
||||
const templatePackageJson =
|
||||
await /** @type {Promise<import("../../packages/create-docusaurus/templates/classic/package.json") & { scripts: { [name: string]: string }; description: string }>} */ (
|
||||
fs.readJSON(`examples/${template}/package.json`)
|
||||
);
|
||||
|
||||
// Attach the dev script which would be used in code sandbox by default
|
||||
templatePackageJson.scripts.dev = 'docusaurus start';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue