mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
Add Prettier Formatting (#258)
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs * Remove trailing-comma as we are using Node 6 on Circle * Use latest Node 6 LTS version in Circle * Remove unused test
This commit is contained in:
parent
0cead4b6f9
commit
65421db62e
50 changed files with 1376 additions and 1350 deletions
|
@ -5,12 +5,12 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const Container = require("./Container.js");
|
||||
const Doc = require("./Doc.js");
|
||||
const DocsSidebar = require("./DocsSidebar.js");
|
||||
const Site = require("./Site.js");
|
||||
const translation = require("../server/translation.js");
|
||||
const React = require('react');
|
||||
const Container = require('./Container.js');
|
||||
const Doc = require('./Doc.js');
|
||||
const DocsSidebar = require('./DocsSidebar.js');
|
||||
const Site = require('./Site.js');
|
||||
const translation = require('../server/translation.js');
|
||||
|
||||
// component used to generate whole webpage for docs, including sidebar/header/footer
|
||||
class DocsLayout extends React.Component {
|
||||
|
@ -28,12 +28,12 @@ class DocsLayout extends React.Component {
|
|||
className="sideNavVisible"
|
||||
title={
|
||||
i18n
|
||||
? translation[this.props.metadata.language]["localized-strings"][
|
||||
? translation[this.props.metadata.language]['localized-strings'][
|
||||
this.props.metadata.localized_id
|
||||
] || this.props.metadata.title
|
||||
: this.props.metadata.title
|
||||
}
|
||||
description={content.trim().split("\n")[0]}
|
||||
description={content.trim().split('\n')[0]}
|
||||
language={metadata.language}
|
||||
version={metadata.version}>
|
||||
<div className="docMainWrapper wrapper">
|
||||
|
@ -47,7 +47,7 @@ class DocsLayout extends React.Component {
|
|||
title={
|
||||
i18n
|
||||
? translation[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
'localized-strings'
|
||||
][this.props.metadata.localized_id] ||
|
||||
this.props.metadata.title
|
||||
: this.props.metadata.title
|
||||
|
@ -58,34 +58,32 @@ class DocsLayout extends React.Component {
|
|||
{metadata.previous_id && (
|
||||
<a
|
||||
className="docs-prev button"
|
||||
href={metadata.previous_id + ".html"}>
|
||||
←{" "}
|
||||
href={metadata.previous_id + '.html'}>
|
||||
←{' '}
|
||||
{i18n
|
||||
? translation[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
'localized-strings'
|
||||
][metadata.previous_id] ||
|
||||
translation[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
]["previous"] ||
|
||||
"Previous"
|
||||
: metadata.previous_title || "Previous"
|
||||
}
|
||||
'localized-strings'
|
||||
]['previous'] ||
|
||||
'Previous'
|
||||
: metadata.previous_title || 'Previous'}
|
||||
</a>
|
||||
)}
|
||||
{metadata.next_id && (
|
||||
<a
|
||||
className="docs-next button"
|
||||
href={metadata.next_id + ".html"}>
|
||||
href={metadata.next_id + '.html'}>
|
||||
{i18n
|
||||
? translation[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
'localized-strings'
|
||||
][metadata.next_id] ||
|
||||
translation[this.props.metadata.language][
|
||||
"localized-strings"
|
||||
]["next"] ||
|
||||
"Next"
|
||||
: metadata.next_title || "Next"
|
||||
}{" "}
|
||||
'localized-strings'
|
||||
]['next'] ||
|
||||
'Next'
|
||||
: metadata.next_title || 'Next'}{' '}
|
||||
→
|
||||
</a>
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue