Skip to content

Commit

Permalink
✨ (settings) improve settings loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed May 20, 2021
1 parent 7afca2e commit a7d3fbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default <Module>function settingsModule() {
// Get Docus config path
let settingsPath = resolve(options.srcDir, 'docus.config')
if (existsSync(settingsPath + '.js')) settingsPath += '.js'
if (existsSync(settingsPath + '.ts')) settingsPath += '.ts'
else if (existsSync(settingsPath + '.ts')) settingsPath += '.ts'

// Get theme settings path
if (!options.themeDir) {
Expand All @@ -31,7 +31,7 @@ export default <Module>function settingsModule() {
}
let themeDefaultsPath = resolve(options.themeDir, 'settings')
if (existsSync(themeDefaultsPath + '.js')) themeDefaultsPath += '.js'
if (existsSync(themeDefaultsPath + '.ts')) themeDefaultsPath += '.ts'
else if (existsSync(themeDefaultsPath + '.ts')) themeDefaultsPath += '.ts'

// Delete Node cache for settings files
clearModule(themeDefaultsPath)
Expand Down

0 comments on commit a7d3fbe

Please sign in to comment.