File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ async function main() {
7373 colors : {
7474 type : "string" ,
7575 } ,
76+ dot : {
77+ type : "string" ,
78+ } ,
7679 } ,
7780 strict : true ,
7881 allowPositionals : true ,
@@ -137,7 +140,13 @@ async function main() {
137140
138141 const colorScheme = await getColorScheme ( values . colors ) ;
139142
140- const svg = graphviz . dot ( graphToDot ( cfg , false , colorScheme ) ) ;
143+ const dot = graphToDot ( cfg , false , colorScheme ) ;
144+
145+ if ( values . dot ) {
146+ await Bun . write ( values . dot , dot ) ;
147+ }
148+
149+ const svg = graphviz . dot ( dot ) ;
141150
142151 if ( values . out ) {
143152 await Bun . write ( values . out , svg ) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ async function main() {
2222 colors : {
2323 type : "string" ,
2424 } ,
25+ dot : {
26+ type : "string" ,
27+ } ,
2528 } ,
2629 } ) ;
2730
@@ -50,7 +53,13 @@ async function main() {
5053 const colorScheme = await getColorScheme ( values . colors ) ;
5154
5255 const graphviz = await Graphviz . load ( ) ;
53- const svg = graphviz . dot ( graphToDot ( cfg , false , colorScheme ) ) ;
56+ const dot = graphToDot ( cfg , false , colorScheme ) ;
57+
58+ if ( values . dot ) {
59+ await Bun . write ( values . dot , dot ) ;
60+ }
61+
62+ const svg = graphviz . dot ( dot ) ;
5463 console . log ( svg ) ;
5564}
5665
You can’t perform that action at this time.
0 commit comments