parseGitLog #
把 readGitLastUpdated 里 git log 调用的输出,转成按绝对路径索引的最后提交时间。
用法 #
TypeScript
import { parseGitLog } from 'kawapress/generator'
const times = parseGitLog('', '/site')
参数
outputstring
git log 调用的输出。
siteRootstring
站点根目录的绝对路径。
返回值 每个文件的最后提交时间(毫秒),按绝对路径索引。
完整类型签名
TypeScript
function parseGitLog(output: string, siteRoot: string): Map<string, number>

评论