mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-22 12:28:44 -05:00
fix: generate readme with code blocks
This commit is contained in:
@@ -11,7 +11,10 @@ function printScripts (pkg, packageManager) {
|
||||
return Object.keys(pkg.scripts).map(key => {
|
||||
return [
|
||||
`\n### ${descriptions[key]}`,
|
||||
`${packageManager} run ${key}\n`
|
||||
'```',
|
||||
`${packageManager} run ${key}`,
|
||||
'```',
|
||||
''
|
||||
].join('\n')
|
||||
}).join('')
|
||||
}
|
||||
@@ -20,7 +23,9 @@ module.exports = function generateReadme (pkg, packageManager) {
|
||||
return [
|
||||
`# ${pkg.name}\n`,
|
||||
'## Project setup',
|
||||
'```',
|
||||
`${packageManager} install`,
|
||||
'```',
|
||||
printScripts(pkg, packageManager)
|
||||
].join('\n')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user