Skip to content

Commit

Permalink
fix: only_includes config
Browse files Browse the repository at this point in the history
  • Loading branch information
TOsmanov committed Dec 11, 2024
1 parent 27ce384 commit 28bce31
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const defaultConfig = path.resolve(cwd, '.markdownlint-cli2')
const defaultSrc = 'src'
const defaultFoliantConfig = path.resolve(cwd, 'foliant.yml')
const defaultIncludesMap = './includes_map.json'
const usedFoliantConfig = path.resolve(cwd, 'only_includes_map.yml')
const usedFoliantConfig = path.resolve(cwd, 'only_includes.yml')

// Options
const verboseOption = new Option('-v, --verbose',
Expand Down Expand Up @@ -407,13 +407,13 @@ backend_config:
pre:
slug: temp_project`)
/* eslint-enable no-useless-escape */
fs.writeFileSync(usedFoliantConfig, onlyIncludesMapConf.join('\n'), (err) => {
if (err) {
console.error(err)
return
}
try {
fs.writeFileSync(usedFoliantConfig, onlyIncludesMapConf.join('\n'))
console.log(`The foliant configuration file ${usedFoliantConfig} for creating the includes map has been successfully generated`)
})
} catch (error) {
console.log(error)
process.exit(1)
}
}

function rmIncludesMap (clearConfig = false) {
Expand Down

0 comments on commit 28bce31

Please sign in to comment.