11var 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+ ] ,
311 branch : {
412 lineWidth : 3 ,
513 spacingX : 60 ,
6- mergeStyle : " straight" ,
14+ mergeStyle : ' straight' ,
715 showLabel : true , // display branch names on graph
8- labelFont : " normal 10pt Arial" ,
16+ labelFont : ' normal 10pt Arial' ,
917 labelRotation : 0 ,
10- color : " black"
18+ color : ' black' ,
1119 } ,
1220 commit : {
1321 spacingY : - 30 ,
1422 dot : {
1523 size : 8 ,
16- strokeColor : " #000000" ,
17- strokeWidth : 4
24+ strokeColor : ' #000000' ,
25+ strokeWidth : 4 ,
1826 } ,
1927 tag : {
20- font : " normal 10pt Arial" ,
21- color : " yellow"
28+ font : ' normal 10pt Arial' ,
29+ color : ' yellow' ,
2230 } ,
2331 message : {
24- color : " black" ,
25- font : " normal 12pt Arial" ,
32+ color : ' black' ,
33+ font : ' normal 12pt Arial' ,
2634 displayAuthor : false ,
2735 displayBranch : false ,
2836 displayHash : false ,
29- }
37+ } ,
3038 } ,
3139 arrow : {
3240 size : 8 ,
3341 offset : 3 ,
34-
35- }
42+ } ,
3643} ) ;
3744
3845var config = {
3946 template : graphConfig ,
40- mode : " extended" ,
41- orientation : " horizontal"
47+ mode : ' extended' ,
48+ orientation : ' horizontal' ,
4249} ;
4350
4451var bugFixCommit = {
4552 messageAuthorDisplay : false ,
4653 messageBranchDisplay : false ,
4754 messageHashDisplay : false ,
48- message : " Bug fix commit(s)"
55+ message : ' Bug fix commit(s)' ,
4956} ;
5057
5158var stabilizationCommit = {
5259 messageAuthorDisplay : false ,
5360 messageBranchDisplay : false ,
5461 messageHashDisplay : false ,
55- message : " Release stabilization commit(s)"
62+ message : ' Release stabilization commit(s)' ,
5663} ;
5764
5865// You can manually fix columns to control the display.
@@ -68,137 +75,131 @@ var masterCol = i++;
6875var gitgraph = new GitGraph ( config ) ;
6976
7077var master = gitgraph . branch ( {
71- name : " master" ,
72- column : masterCol
78+ name : ' master' ,
79+ column : masterCol ,
7380} ) ;
74- master . commit ( " Initial commit" ) ;
81+ master . commit ( ' Initial commit' ) ;
7582
7683var develop = gitgraph . branch ( {
7784 parentBranch : master ,
78- name : " dev" ,
79- column : developCol
85+ name : ' dev' ,
86+ column : developCol ,
8087} ) ;
8188
8289var developV3 = gitgraph . branch ( {
8390 parentBranch : master ,
84- name : " dev-3.0" ,
85- column : developV3Col
91+ name : ' dev-3.0' ,
92+ column : developV3Col ,
8693} ) ;
8794
88-
8995var longRunning = gitgraph . branch ( {
9096 parentBranch : master ,
91- name : " long-running-improvement" ,
92- column : longRunningCol
97+ name : ' long-running-improvement' ,
98+ column : longRunningCol ,
9399} ) ;
94100
95101develop . commit ( {
96- messageDisplay : false
102+ messageDisplay : false ,
97103} ) ;
98104developV3 . commit ( {
99- messageDisplay : false
105+ messageDisplay : false ,
100106} ) ;
101107
102108longRunning . commit ( {
103- messageDisplay : false
109+ messageDisplay : false ,
104110} ) ;
105111longRunning . merge ( developV3 ) ;
106112
107113var feature1 = gitgraph . branch ( {
108114 parentBranch : develop ,
109- name : " feature/1-description" ,
110- column : featureCol
115+ name : ' feature/1-description' ,
116+ column : featureCol ,
111117} ) ;
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 ,
114120} ) ;
115121develop . merge ( feature1 ) ;
116- feature1 . commit ( " Small Bugfix" ) . commit ( {
117- messageDisplay : false
122+ feature1 . commit ( ' Small Bugfix' ) . commit ( {
123+ messageDisplay : false ,
118124} ) ;
119125feature1 . merge ( develop ) ;
120126
121-
122127var feature3X = gitgraph . branch ( {
123128 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 ,
126131} ) ;
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 ,
129134} ) ;
130135feature3X . merge ( developV3 ) ;
131136
132-
133137var feature2 = gitgraph . branch ( {
134138 parentBranch : develop ,
135- name : " feature/2-description" ,
136- column : featureCol
139+ name : ' feature/2-description' ,
140+ column : featureCol ,
137141} ) ;
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 ,
140144} ) ;
141145feature2 . merge ( develop ) ;
142146feature2 . merge ( developV3 ) ;
143147
144- develop . merge ( master , {
148+ develop . merge ( master , {
145149 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' ,
148152} ) ;
149153
150-
151154develop . commit ( {
152- messageDisplay : false
155+ messageDisplay : false ,
153156} ) ;
154157
155-
156158longRunning . commit ( {
157- messageDisplay : false
159+ messageDisplay : false ,
158160} ) ;
159161
160162developV3 . merge ( longRunning ) ;
161163
162164longRunning . commit ( {
163- messageDisplay : false
165+ messageDisplay : false ,
164166} ) ;
165167
166168var feature3 = gitgraph . branch ( {
167169 parentBranch : develop ,
168- name : " bugfix/3-description" ,
169- column : featureCol
170+ name : ' bugfix/3-description' ,
171+ column : featureCol ,
170172} ) ;
171173
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 ,
174176} ) ;
175177feature3 . merge ( develop ) ;
176178
177179longRunning . merge ( developV3 ) ;
178180
179181developV3 . commit ( {
180182 messageDisplay : false ,
181- dotStrokeWidth : 10
183+ dotStrokeWidth : 10 ,
182184} ) ;
183185
184-
185186develop . commit ( {
186- messageDisplay : false
187+ messageDisplay : false ,
187188} ) ;
188189
189190develop . commit ( {
190- messageDisplay : false
191+ messageDisplay : false ,
191192} ) ;
192193
193194develop . merge ( master , {
194195 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' ,
197198} ) ;
198199
199200develop . commit ( {
200201 messageDisplay : false ,
201- dotStrokeWidth : 10
202+ dotStrokeWidth : 10 ,
202203} ) ;
203204
204205developV3 . checkout ( ) ;
0 commit comments