@@ -18,6 +18,7 @@ const cleanHtml = require('js-beautify').html;
18
18
const inherits = require ( 'util' ) . inherits ;
19
19
const pm = require ( './plugin_manager' ) ;
20
20
const packageInfo = require ( '../../package.json' ) ;
21
+ const defaultConfig = require ( '../../patternlab-config.json' ) ;
21
22
const dataLoader = require ( './data_loader' ) ( ) ;
22
23
const logger = require ( './log' ) ;
23
24
const jsonCopy = require ( './json_copy' ) ;
@@ -269,7 +270,6 @@ class PatternLab {
269
270
270
271
271
272
// info methods
272
-
273
273
getVersion ( ) {
274
274
return this . package . version ;
275
275
}
@@ -422,6 +422,15 @@ function installPlugin(pluginName) {
422
422
plugin_manager . install_plugin ( pluginName ) ;
423
423
}
424
424
425
+ /**
426
+ * Returns the standardized default config
427
+ *
428
+ * @return {object } Returns the object representation of the patternlab-config.json
429
+ */
430
+ function getDefaultConfig ( ) {
431
+ return defaultConfig
432
+ }
433
+
425
434
const patternlab_engine = function ( config ) {
426
435
const patternlab = new PatternLab ( config ) ;
427
436
const paths = patternlab . config . paths ;
@@ -730,7 +739,7 @@ const patternlab_engine = function (config) {
730
739
version : function ( ) {
731
740
return patternlab . logVersion ( ) ;
732
741
} ,
733
-
742
+
734
743
/**
735
744
* return current version
736
745
*
@@ -869,5 +878,6 @@ const patternlab_engine = function (config) {
869
878
patternlab_engine . build_pattern_data = buildPatternData ;
870
879
patternlab_engine . process_all_patterns_iterative = processAllPatternsIterative ;
871
880
patternlab_engine . process_all_patterns_recursive = processAllPatternsRecursive ;
881
+ patternlab_engine . getDefaultConfig = getDefaultConfig ;
872
882
873
883
module . exports = patternlab_engine ;
0 commit comments