-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.js
37 lines (36 loc) · 913 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
const Q = require(`q`);
const conventionalChangelog = require(`./conventional-changelog`);
const parserOpts = require(`./parser-opts`);
const recommendedBumpOpts = require(`./conventional-recommended-bump`);
const writerOpts = require(`./writer-opts`);
// 格式化 git log 信息
const gitRawCommitsOpts = require('./git-raw-commit');
// GitHub/GitLab 信息格式,因为 GitLab 通过 commits 无法访问到具体的记录,但 GitHub 都支持
let context = {
commit: 'commit'
};
module.exports = Q.all([
conventionalChangelog,
parserOpts,
recommendedBumpOpts,
writerOpts,
gitRawCommitsOpts
]).spread(
(
conventionalChangelog,
parserOpts,
recommendedBumpOpts,
writerOpts,
gitRawCommitsOpts
) => {
return {
context,
conventionalChangelog,
parserOpts,
recommendedBumpOpts,
writerOpts,
gitRawCommitsOpts
};
}
);