mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 05:27:00 +02:00
chore(v2): fix code style (revert previous changes)
This commit is contained in:
parent
1480a7eb80
commit
1f00d15c74
143 changed files with 457 additions and 458 deletions
|
@ -15,7 +15,7 @@ const path = require('path');
|
|||
|
||||
const CWD = process.cwd();
|
||||
|
||||
const toHex = color => {
|
||||
const toHex = (color) => {
|
||||
const hex = color.toString(16);
|
||||
return hex.length === 1 ? `0${hex}` : hex;
|
||||
};
|
||||
|
@ -37,7 +37,7 @@ let feature;
|
|||
|
||||
commander
|
||||
.arguments('[feature]')
|
||||
.action(feat => {
|
||||
.action((feat) => {
|
||||
feature = feat;
|
||||
})
|
||||
.parse(process.argv);
|
||||
|
@ -85,7 +85,7 @@ if (feature === 'translations') {
|
|||
fs.copySync(`${folder}/crowdin.yaml`, `${CWD}/../crowdin.yaml`);
|
||||
}
|
||||
const files = glob.sync(`${folder}/**/*`);
|
||||
files.forEach(file => {
|
||||
files.forEach((file) => {
|
||||
if (fs.lstatSync(file).isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ if (feature === 'translations') {
|
|||
// copy files for versions
|
||||
const folder = path.join(__dirname, '..', 'examples', 'versions');
|
||||
const files = glob.sync(`${folder}/**/*`);
|
||||
files.forEach(file => {
|
||||
files.forEach((file) => {
|
||||
if (fs.lstatSync(file).isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ if (feature === 'translations') {
|
|||
// copy other files
|
||||
const files = glob.sync(`${folder}/**/*`);
|
||||
const {primaryColor, secondaryColor} = colorScheme();
|
||||
files.forEach(file => {
|
||||
files.forEach((file) => {
|
||||
if (fs.lstatSync(file).isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ if (feature === 'translations') {
|
|||
});
|
||||
|
||||
const svgs = glob.sync(`${CWD}/static/img/**/*.svg`);
|
||||
svgs.forEach(file => {
|
||||
svgs.forEach((file) => {
|
||||
// Replace primary colors of SVGs.
|
||||
const newImage = fs
|
||||
.readFileSync(file, 'utf8')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue