@@ -52,7 +52,7 @@ var ui_builder = function () {
52
52
53
53
54
54
if ( ! patternlab . viewAllPaths [ pattern . patternGroup ] [ 'all' ] ) {
55
- patternlab . viewAllPaths [ pattern . patternGroup ] [ 'all' ] = pattern . flatPatternPath ;
55
+ patternlab . viewAllPaths [ pattern . patternGroup ] [ 'all' ] = pattern . patternType ;
56
56
}
57
57
}
58
58
@@ -132,7 +132,7 @@ var ui_builder = function () {
132
132
patternSectionSubtype : isSubtypePattern ,
133
133
patternLink : pattern . flatPatternPath + path . sep + 'index.html' ,
134
134
isPattern : false ,
135
- engine : null ,
135
+ engine : pattern . engine ,
136
136
137
137
//todo this might be broken yet
138
138
flatPatternPath : pattern . flatPatternPath , // + (isSubtypePattern ? '-' + pattern.patternSubGroup : ''),
@@ -320,10 +320,6 @@ var ui_builder = function () {
320
320
return groupedPatterns ;
321
321
}
322
322
323
- function buildNavigation ( patternlab , patterns ) {
324
-
325
- }
326
-
327
323
function buildFooterHTML ( patternlab , patternPartial ) {
328
324
//set the pattern-specific footer by compiling the general-footer with data, and then adding it to the meta footer
329
325
var footerPartial = pattern_assembler . renderPattern ( patternlab . footer , {
@@ -338,15 +334,9 @@ var ui_builder = function () {
338
334
return footerHTML ;
339
335
}
340
336
341
- function buildViewAllHTML ( patternlab , patterns , patternPartial , isPatternType ) {
342
-
343
- console . log ( 343 , 'building viewall HTML for' , patternPartial ) ;
344
-
345
- //if (isPatternType) {
346
- // patternPartial = patternPartial.substring(patternPartial.indexOf('viewall-'));
347
- // console.log(21, patternPartial);
348
- //}
337
+ function buildViewAllHTML ( patternlab , patterns , patternPartial ) {
349
338
339
+ //console.log(343, 'building viewall HTML for', patternPartial);
350
340
351
341
var viewAllHTML = pattern_assembler . renderPattern ( patternlab . viewAll ,
352
342
{
@@ -422,17 +412,15 @@ var ui_builder = function () {
422
412
var footerHTML = buildFooterHTML ( patternlab , patternType ) ;
423
413
424
414
//render the viewall template
425
- var viewAllHTML = buildViewAllHTML ( patternlab , typePatterns , patternType , true ) ;
415
+ var viewAllHTML = buildViewAllHTML ( patternlab , typePatterns , patternType ) ;
426
416
427
- // writeFile(paths.public.patterns + p.subdir + '/index.json', JSON.stringify(typePatterns));
417
+ writeFile ( paths . public . patterns + p . subdir + '/index.json' , JSON . stringify ( typePatterns ) ) ;
428
418
console . log ( 5 , 'trying to write view all file to patterns/' , p . subdir ) ;
429
419
430
420
writeFile ( paths . public . patterns + p . subdir + '/index.html' , mainPageHeadHtml + viewAllHTML + footerHTML ) ;
431
421
432
422
patterns = patterns . concat ( typePatterns ) ;
433
423
434
- console . log ( 3.57 , patterns . length ) ;
435
-
436
424
} ) ;
437
425
438
426
writeFile ( paths . public . patterns + '/patterns.json' , JSON . stringify ( patterns ) ) ;
@@ -521,16 +509,25 @@ var ui_builder = function () {
521
509
//build the viewall pages
522
510
var patterns = buildViewAllPages ( headerHTML , patternlab , styleguidePatterns ) ;
523
511
524
-
525
512
writeFile ( './all.json' , JSON . stringify ( patterns ) ) ;
526
513
527
-
528
514
//build the main styleguide page
529
515
//todo broken
530
516
var styleguideHtml = pattern_assembler . renderPattern ( patternlab . viewAll ,
531
517
{
532
- partials : patterns ,
533
- cacheBuster : patternlab . cacheBuster
518
+ //partials: patterns
519
+ partials : [
520
+ {
521
+ "patternSectionSubtype" : {
522
+ "patternName" : "global" ,
523
+ "patternLink" : "00-atoms-00-global\\index.html" ,
524
+ "patternPartial" : "viewall-atoms-global" ,
525
+ "patternSectionSubtype" : true ,
526
+ "patternDesc" : ""
527
+ }
528
+
529
+ }
530
+ ]
534
531
} , {
535
532
patternSection : patternlab . patternSection ,
536
533
patternSectionSubType : patternlab . patternSectionSubType
0 commit comments