mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-30 11:08:58 +08:00
12 lines
400 B
JavaScript
12 lines
400 B
JavaScript
var fs = require('fs')
|
|
var read = fs.readFileSync
|
|
var write = fs.writeFileSync
|
|
var version = process.env.VERSION || require('../package.json').version
|
|
|
|
var file = __dirname + '/../docs/_coverpage.md'
|
|
var cover = read(file, 'utf8').toString()
|
|
|
|
console.log('Replace version number in cover page...')
|
|
cover = cover.replace(/<small>(\S+)?<\/small>/g, '<small>' + version + '</small>')
|
|
write(file, cover)
|