"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scripts/config-doc.js" between
npm-cli-7.16.0.tar.gz and npm-cli-7.17.0.tar.gz

About: npm is a JavaScript package manager (requires node v6 or higher).

config-doc.js  (npm-cli-7.16.0):config-doc.js  (npm-cli-7.17.0)
skipping to change at line 42 skipping to change at line 42
const addShorthands = doc => { const addShorthands = doc => {
const startTag = '<!-- AUTOGENERATED CONFIG SHORTHANDS START -->' const startTag = '<!-- AUTOGENERATED CONFIG SHORTHANDS START -->'
const endTag = '<!-- AUTOGENERATED CONFIG SHORTHANDS END -->' const endTag = '<!-- AUTOGENERATED CONFIG SHORTHANDS END -->'
const body = Object.entries(shorthands) const body = Object.entries(shorthands)
.sort(([shorta, expansiona], [shortb, expansionb]) => { .sort(([shorta, expansiona], [shortb, expansionb]) => {
// sort by what they're short FOR // sort by what they're short FOR
return expansiona.join(' ').localeCompare(expansionb.join(' '), 'en') || return expansiona.join(' ').localeCompare(expansionb.join(' '), 'en') ||
shorta.localeCompare(shortb, 'en') shorta.localeCompare(shortb, 'en')
}) })
.map(([short, expansion]) => { .map(([short, expansion]) => {
const dash = short.length === 1 ? '-' : '--' const dash = short.length === 1 ? '-' : '--'
return `* \`${dash}${short}\`: \`${expansion.join(' ')}\`` return `* \`${dash}${short}\`: \`${expansion.join(' ')}\``
}).join('\n') }).join('\n')
return addBetweenTags(doc, startTag, endTag, body) return addBetweenTags(doc, startTag, endTag, body)
} }
const doc = readFileSync(configDoc, 'utf8') const doc = readFileSync(configDoc, 'utf8')
writeFileSync(configDoc, addDescriptions(addShorthands(doc))) writeFileSync(configDoc, addDescriptions(addShorthands(doc)))
console.log(`updated docs/content/using-npm/config.md`) console.log(`updated docs/content/using-npm/config.md`)
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)