mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-27 23:17:56 +02:00
Update prettier to 1.9.1 (#273)
This commit is contained in:
parent
c22203523f
commit
b174ee2d2a
9 changed files with 23 additions and 44 deletions
|
@ -98,14 +98,10 @@ files.forEach(file => {
|
|||
|
||||
if (!metadata.original_id) {
|
||||
console.error(
|
||||
`No 'original_id' field found in ${
|
||||
file
|
||||
}. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
`No 'original_id' field found in ${file}. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
);
|
||||
throw new Error(
|
||||
`No 'original_id' field found in ${
|
||||
file
|
||||
}. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
`No 'original_id' field found in ${file}. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
);
|
||||
}
|
||||
if (!metadata.id) {
|
||||
|
@ -113,14 +109,10 @@ files.forEach(file => {
|
|||
throw new Error(`No 'id' field found in ${file}.`);
|
||||
} else if (metadata.id.indexOf('version-') === -1) {
|
||||
console.error(
|
||||
`The 'id' field in ${
|
||||
file
|
||||
} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
`The 'id' field in ${file} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
);
|
||||
throw new Error(
|
||||
`The 'id' field in ${
|
||||
file
|
||||
} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
`The 'id' field in ${file} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -141,9 +133,7 @@ files.forEach(file => {
|
|||
function docVersion(id, req_version) {
|
||||
if (!available[id]) {
|
||||
throw new Error(
|
||||
`Document with id '${
|
||||
id
|
||||
}' was requested but no document with that id could be located.`
|
||||
`Document with id '${id}' was requested but no document with that id could be located.`
|
||||
);
|
||||
}
|
||||
// iterate through versions until a version less than or equal to the requested
|
||||
|
@ -286,9 +276,7 @@ function sidebarVersion(req_version) {
|
|||
}
|
||||
}
|
||||
throw new Error(
|
||||
`No sidebar file available to use for version ${
|
||||
req_version
|
||||
}. Verify that 'version-${req_version}-sidebars.json' exists.`
|
||||
`No sidebar file available to use for version ${req_version}. Verify that 'version-${req_version}-sidebars.json' exists.`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue