Skip to content

Commit c919e3d

Browse files
author
Tobias Brennecke
committed
#540 Add flag for GraphViz export
1 parent 6471790 commit c919e3d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/lib/patternlab.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,10 @@ var patternlab_engine = function (config) {
544544

545545
// Saves the pattern graph when all files have been compiled
546546
PatternGraph.storeToFile(patternlab);
547-
PatternGraph.exportToDot(patternlab, "dependencyGraph.dot");
547+
if (patternlab.config.exportToGraphViz) {
548+
PatternGraph.exportToDot(patternlab, "dependencyGraph.dot");
549+
plutils.log.info(`Exported pattern graph to ${path.join(config.paths.public.root, "dependencyGraph.dot")}`);
550+
}
548551

549552
//export patterns if necessary
550553
pattern_exporter.export_patterns(patternlab);

patternlab-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@
6161
"markupOnly": ".markup-only"
6262
},
6363
"cleanOutputHtml": true,
64-
"export_graphviz": false
64+
"exportToGraphViz": false
6565
}

0 commit comments

Comments
 (0)