@@ -19,57 +19,6 @@ module.exports = function (currentPattern, patternlab) {
19
19
foundPatternPartials . length > 0
20
20
) {
21
21
logger . debug ( `found partials for ${ currentPattern . patternPartial } ` ) ;
22
-
23
- // determine if the template contains any pattern parameters. if so they
24
- // must be immediately consumed
25
- return parameter_hunter
26
- . find_parameters ( currentPattern , patternlab )
27
- . then ( ( ) => {
28
- //do something with the regular old partials
29
- foundPatternPartials . forEach ( ( foundPartial ) => {
30
- const partial = currentPattern . findPartial ( foundPartial ) ;
31
- const partialPattern = getPartial ( partial , patternlab ) ;
32
-
33
- //recurse through nested partials to fill out this extended template.
34
- return processRecursive ( partialPattern . relPath , patternlab )
35
- . then ( ( ) => {
36
- //eslint-disable-line no-loop-func
37
-
38
- //complete assembly of extended template
39
- //create a copy of the partial so as to not pollute it after the getPartial call.
40
- const cleanPartialPattern = jsonCopy (
41
- partialPattern ,
42
- `partial pattern ${ partial } `
43
- ) ;
44
-
45
- //this is what we came here for
46
- logger . debug (
47
- `within ${ currentPattern . patternPartial } , replacing extendedTemplate partial ${ foundPartial } with ${ cleanPartialPattern . patternPartial } 's extendedTemplate`
48
- ) ;
49
-
50
- currentPattern . extendedTemplate =
51
- currentPattern . extendedTemplate . replace (
52
- foundPartial ,
53
- cleanPartialPattern . extendedTemplate
54
- ) ;
55
-
56
- // update the extendedTemplate in the partials object in case this
57
- // pattern is consumed later
58
- patternlab . partials [ currentPattern . patternPartial ] =
59
- currentPattern . extendedTemplate ;
60
-
61
- return Promise . resolve ( ) ;
62
- } )
63
- . catch ( ( reason ) => {
64
- console . log ( reason ) ;
65
- logger . error ( reason ) ;
66
- } ) ;
67
- } ) ;
68
- } )
69
- . catch ( ( reason ) => {
70
- console . log ( reason ) ;
71
- logger . error ( reason ) ;
72
- } ) ;
73
22
}
74
23
return Promise . resolve ( ) ;
75
24
} ;
0 commit comments