mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +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
|
@ -60,9 +60,7 @@ class Head extends React.Component {
|
|||
)}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href={`//cdnjs.cloudflare.com/ajax/libs/highlight.js/${
|
||||
highlightVersion
|
||||
}/styles/${highlightTheme}.min.css`}
|
||||
href={`//cdnjs.cloudflare.com/ajax/libs/highlight.js/${highlightVersion}/styles/${highlightTheme}.min.css`}
|
||||
/>
|
||||
{hasBlog && (
|
||||
<link
|
||||
|
|
|
@ -54,9 +54,7 @@ let remoteBranch;
|
|||
if (USE_SSH === 'true') {
|
||||
remoteBranch = `git@github.com:${ORGANIZATION_NAME}/${PROJECT_NAME}.git`;
|
||||
} else {
|
||||
remoteBranch = `https://${GIT_USER}@github.com/${ORGANIZATION_NAME}/${
|
||||
PROJECT_NAME
|
||||
}.git`;
|
||||
remoteBranch = `https://${GIT_USER}@github.com/${ORGANIZATION_NAME}/${PROJECT_NAME}.git`;
|
||||
}
|
||||
|
||||
if (IS_PULL_REQUEST) {
|
||||
|
@ -120,9 +118,7 @@ excludePath = `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`;
|
|||
// https://github.com/shelljs/shelljs/issues/79
|
||||
if (
|
||||
shell.exec(
|
||||
`rsync -rt --exclude=${excludePath} --exclude=.DS_Store ${fromPath} ${
|
||||
toPath
|
||||
}`
|
||||
`rsync -rt --exclude=${excludePath} --exclude=.DS_Store ${fromPath} ${toPath}`
|
||||
).code !== 0
|
||||
) {
|
||||
shell.echo(`Error: Copying build assets failed`);
|
||||
|
@ -137,9 +133,7 @@ shell.exec('git add --all');
|
|||
|
||||
if (
|
||||
shell.exec(
|
||||
`git commit -m "Deploy website" -m "Deploy website version based on ${
|
||||
currentCommit
|
||||
}"`
|
||||
`git commit -m "Deploy website" -m "Deploy website version based on ${currentCommit}"`
|
||||
).code !== 0
|
||||
) {
|
||||
shell.echo(`Error: Committing static website failed`);
|
||||
|
|
|
@ -74,9 +74,7 @@ if (versionIndex < 0) {
|
|||
console.error(
|
||||
`${chalk.yellow(
|
||||
'Version ' + currentVersion + ' does not currently exist!'
|
||||
)}\n Version ${
|
||||
currentVersion
|
||||
} is not in the versions.json file. You can only rename existing versions.`
|
||||
)}\n Version ${currentVersion} is not in the versions.json file. You can only rename existing versions.`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
|
@ -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.`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,9 +92,7 @@ function execute() {
|
|||
if (!file.endsWith('-sidebars.json')) {
|
||||
if (file.endsWith('-sidebar.json')) {
|
||||
console.warn(
|
||||
`Skipping ${
|
||||
file
|
||||
}. Make sure your sidebar filenames follow this format: 'version-VERSION-sidebars.json'.`
|
||||
`Skipping ${file}. Make sure your sidebar filenames follow this format: 'version-VERSION-sidebars.json'.`
|
||||
);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue