mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-18 17:17:57 +02:00
chore(loader): prettier & eslint
This commit is contained in:
parent
d2e12a8e61
commit
7116374adf
5 changed files with 108 additions and 118 deletions
|
@ -1,14 +1,14 @@
|
|||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = function loadConfig(sourceDir, deleteCache = true) {
|
||||
const configPath = path.resolve(sourceDir, '.blogi', 'config.js');
|
||||
if (deleteCache) {
|
||||
delete require.cache[configPath];
|
||||
}
|
||||
let config = {};
|
||||
if (fs.existsSync(configPath)) {
|
||||
config = require(configPath);
|
||||
}
|
||||
return config;
|
||||
};
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = function loadConfig(sourceDir, deleteCache = true) {
|
||||
const configPath = path.resolve(sourceDir, '.blogi', 'config.js');
|
||||
if (deleteCache) {
|
||||
delete require.cache[configPath];
|
||||
}
|
||||
let config = {};
|
||||
if (fs.existsSync(configPath)) {
|
||||
config = require(configPath); // eslint-disable-line
|
||||
}
|
||||
return config;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue