1
1
var graphConfig = new GitGraph . Template ( {
2
- colors : [ "#9993FF" , "#47E8D4" , "#6BDB52" , "#F85BB5" , "#FFA657" , "#FFCCAA" , "#F85BB5" ] ,
2
+ colors : [
3
+ '#9993FF' ,
4
+ '#47E8D4' ,
5
+ '#6BDB52' ,
6
+ '#F85BB5' ,
7
+ '#FFA657' ,
8
+ '#FFCCAA' ,
9
+ '#F85BB5' ,
10
+ ] ,
3
11
branch : {
4
12
lineWidth : 3 ,
5
13
spacingX : 60 ,
6
- mergeStyle : " straight" ,
14
+ mergeStyle : ' straight' ,
7
15
showLabel : true , // display branch names on graph
8
- labelFont : " normal 10pt Arial" ,
16
+ labelFont : ' normal 10pt Arial' ,
9
17
labelRotation : 0 ,
10
- color : " black"
18
+ color : ' black' ,
11
19
} ,
12
20
commit : {
13
21
spacingY : - 30 ,
14
22
dot : {
15
23
size : 8 ,
16
- strokeColor : " #000000" ,
17
- strokeWidth : 4
24
+ strokeColor : ' #000000' ,
25
+ strokeWidth : 4 ,
18
26
} ,
19
27
tag : {
20
- font : " normal 10pt Arial" ,
21
- color : " yellow"
28
+ font : ' normal 10pt Arial' ,
29
+ color : ' yellow' ,
22
30
} ,
23
31
message : {
24
- color : " black" ,
25
- font : " normal 12pt Arial" ,
32
+ color : ' black' ,
33
+ font : ' normal 12pt Arial' ,
26
34
displayAuthor : false ,
27
35
displayBranch : false ,
28
36
displayHash : false ,
29
- }
37
+ } ,
30
38
} ,
31
39
arrow : {
32
40
size : 8 ,
33
41
offset : 3 ,
34
-
35
- }
42
+ } ,
36
43
} ) ;
37
44
38
45
var config = {
39
46
template : graphConfig ,
40
- mode : " extended" ,
41
- orientation : " horizontal"
47
+ mode : ' extended' ,
48
+ orientation : ' horizontal' ,
42
49
} ;
43
50
44
51
var bugFixCommit = {
45
52
messageAuthorDisplay : false ,
46
53
messageBranchDisplay : false ,
47
54
messageHashDisplay : false ,
48
- message : " Bug fix commit(s)"
55
+ message : ' Bug fix commit(s)' ,
49
56
} ;
50
57
51
58
var stabilizationCommit = {
52
59
messageAuthorDisplay : false ,
53
60
messageBranchDisplay : false ,
54
61
messageHashDisplay : false ,
55
- message : " Release stabilization commit(s)"
62
+ message : ' Release stabilization commit(s)' ,
56
63
} ;
57
64
58
65
// You can manually fix columns to control the display.
@@ -68,137 +75,131 @@ var masterCol = i++;
68
75
var gitgraph = new GitGraph ( config ) ;
69
76
70
77
var master = gitgraph . branch ( {
71
- name : " master" ,
72
- column : masterCol
78
+ name : ' master' ,
79
+ column : masterCol ,
73
80
} ) ;
74
- master . commit ( " Initial commit" ) ;
81
+ master . commit ( ' Initial commit' ) ;
75
82
76
83
var develop = gitgraph . branch ( {
77
84
parentBranch : master ,
78
- name : " dev" ,
79
- column : developCol
85
+ name : ' dev' ,
86
+ column : developCol ,
80
87
} ) ;
81
88
82
89
var developV3 = gitgraph . branch ( {
83
90
parentBranch : master ,
84
- name : " dev-3.0" ,
85
- column : developV3Col
91
+ name : ' dev-3.0' ,
92
+ column : developV3Col ,
86
93
} ) ;
87
94
88
-
89
95
var longRunning = gitgraph . branch ( {
90
96
parentBranch : master ,
91
- name : " long-running-improvement" ,
92
- column : longRunningCol
97
+ name : ' long-running-improvement' ,
98
+ column : longRunningCol ,
93
99
} ) ;
94
100
95
101
develop . commit ( {
96
- messageDisplay : false
102
+ messageDisplay : false ,
97
103
} ) ;
98
104
developV3 . commit ( {
99
- messageDisplay : false
105
+ messageDisplay : false ,
100
106
} ) ;
101
107
102
108
longRunning . commit ( {
103
- messageDisplay : false
109
+ messageDisplay : false ,
104
110
} ) ;
105
111
longRunning . merge ( developV3 ) ;
106
112
107
113
var feature1 = gitgraph . branch ( {
108
114
parentBranch : develop ,
109
- name : " feature/1-description" ,
110
- column : featureCol
115
+ name : ' feature/1-description' ,
116
+ column : featureCol ,
111
117
} ) ;
112
- feature1 . commit ( " #1 A feature to go into v2.8.0" ) . commit ( {
113
- messageDisplay : false
118
+ feature1 . commit ( ' #1 A feature to go into v2.8.0' ) . commit ( {
119
+ messageDisplay : false ,
114
120
} ) ;
115
121
develop . merge ( feature1 ) ;
116
- feature1 . commit ( " Small Bugfix" ) . commit ( {
117
- messageDisplay : false
122
+ feature1 . commit ( ' Small Bugfix' ) . commit ( {
123
+ messageDisplay : false ,
118
124
} ) ;
119
125
feature1 . merge ( develop ) ;
120
126
121
-
122
127
var feature3X = gitgraph . branch ( {
123
128
parentBranch : developV3 ,
124
- name : " feature/42-feature-for-3-x-only" ,
125
- column : featureV3Col
129
+ name : ' feature/42-feature-for-3-x-only' ,
130
+ column : featureV3Col ,
126
131
} ) ;
127
- feature3X . commit ( " #42 A feature to go into v3.X" ) . commit ( {
128
- messageDisplay : false
132
+ feature3X . commit ( ' #42 A feature to go into v3.X' ) . commit ( {
133
+ messageDisplay : false ,
129
134
} ) ;
130
135
feature3X . merge ( developV3 ) ;
131
136
132
-
133
137
var feature2 = gitgraph . branch ( {
134
138
parentBranch : develop ,
135
- name : " feature/2-description" ,
136
- column : featureCol
139
+ name : ' feature/2-description' ,
140
+ column : featureCol ,
137
141
} ) ;
138
- feature2 . commit ( " #2 Another feature to go into v2.8.0" ) . commit ( {
139
- messageDisplay : false
142
+ feature2 . commit ( ' #2 Another feature to go into v2.8.0' ) . commit ( {
143
+ messageDisplay : false ,
140
144
} ) ;
141
145
feature2 . merge ( develop ) ;
142
146
feature2 . merge ( developV3 ) ;
143
147
144
- develop . merge ( master , {
148
+ develop . merge ( master , {
145
149
dotStrokeWidth : 10 ,
146
- message : " Release v2.8.1 tagged" ,
147
- tag : " v2.8.1"
150
+ message : ' Release v2.8.1 tagged' ,
151
+ tag : ' v2.8.1' ,
148
152
} ) ;
149
153
150
-
151
154
develop . commit ( {
152
- messageDisplay : false
155
+ messageDisplay : false ,
153
156
} ) ;
154
157
155
-
156
158
longRunning . commit ( {
157
- messageDisplay : false
159
+ messageDisplay : false ,
158
160
} ) ;
159
161
160
162
developV3 . merge ( longRunning ) ;
161
163
162
164
longRunning . commit ( {
163
- messageDisplay : false
165
+ messageDisplay : false ,
164
166
} ) ;
165
167
166
168
var feature3 = gitgraph . branch ( {
167
169
parentBranch : develop ,
168
- name : " bugfix/3-description" ,
169
- column : featureCol
170
+ name : ' bugfix/3-description' ,
171
+ column : featureCol ,
170
172
} ) ;
171
173
172
- feature3 . commit ( " A feature to go into v2.8.0" ) . commit ( {
173
- messageDisplay : false
174
+ feature3 . commit ( ' A feature to go into v2.8.0' ) . commit ( {
175
+ messageDisplay : false ,
174
176
} ) ;
175
177
feature3 . merge ( develop ) ;
176
178
177
179
longRunning . merge ( developV3 ) ;
178
180
179
181
developV3 . commit ( {
180
182
messageDisplay : false ,
181
- dotStrokeWidth : 10
183
+ dotStrokeWidth : 10 ,
182
184
} ) ;
183
185
184
-
185
186
develop . commit ( {
186
- messageDisplay : false
187
+ messageDisplay : false ,
187
188
} ) ;
188
189
189
190
develop . commit ( {
190
- messageDisplay : false
191
+ messageDisplay : false ,
191
192
} ) ;
192
193
193
194
develop . merge ( master , {
194
195
dotStrokeWidth : 10 ,
195
- message : " Release v2.9.0 tagged" ,
196
- tag : " v2.9.0"
196
+ message : ' Release v2.9.0 tagged' ,
197
+ tag : ' v2.9.0' ,
197
198
} ) ;
198
199
199
200
develop . commit ( {
200
201
messageDisplay : false ,
201
- dotStrokeWidth : 10
202
+ dotStrokeWidth : 10 ,
202
203
} ) ;
203
204
204
205
developV3 . checkout ( ) ;
0 commit comments