this-commit:获取当前提交名称

时间:2021-06-29 01:02:54
【文件属性】:
文件名称:this-commit:获取当前提交名称
文件大小:9KB
文件格式:ZIP
更新时间:2021-06-29 01:02:54
JavaScript 这个承诺 获取当前提交名称 安装 npm install this-commit --save 用法 var commit = require ( 'this-commit' ) ( ) // commit is a string like '5cdb9922ab793900847a3c3801831f1f242be11b' // or '' if could not found var commit = require ( 'this-commit' ) . asBuffer ( ) // commit is a Buffer instance (or null) 两种形式都接受“.git”文件夹作为可选参数。 默认情况下,它将通过从当前工作目录向上走来找到。 特征 从磁盘上的.git文件夹中读取,不执行git 从子目录工作,将在父目录上查找.git 支持分离头 支持打包参考
【文件预览】:
this-commit-master
----index.js(2KB)
----package.json(492B)
----test()
--------index.js(624B)
--------simple-ref()
--------packed-ref()
--------detached-head()
----LICENSE(1KB)
----.npmignore(4B)
----.gitignore(12B)
----README.md(656B)
----.jshintrc(339B)

网友评论